1
marmotte
Using an external database for users
  • 2011/8/11 15:58

  • marmotte

  • Just popping in

  • Posts: 3

  • Since: 2011/7/15


I have 2 xoops websites with their own database.
The thing is I want to use the same user table for both of them and keep the databases separated.
The two sites don't use the same table prefix.

What is the best way to do that?
If I have to do it manually, what are the files to change?

Thanks in advance.

2
Rheas
Re: Using an external database for users
  • 2011/8/11 20:24

  • Rheas

  • Just popping in

  • Posts: 43

  • Since: 2003/2/21


Hello marmotte,
odd thing. I suppose someone will provide a more sensible solution, but I did something like that once with phpAdmin.
I located the User table in one db, then copied and pasted it into the other. That worked for me.

3
marmotte
Re: Using an external database for users
  • 2011/8/11 20:41

  • marmotte

  • Just popping in

  • Posts: 3

  • Since: 2011/7/15


It will works, but I also want new users to be shared between the 2 websites

4
Rheas
Re: Using an external database for users
  • 2011/8/11 20:55

  • Rheas

  • Just popping in

  • Posts: 43

  • Since: 2003/2/21


okay. It sounds like you need more than help than I can provide. good luck

5
deepak267
Re: Using an external database for users
  • 2011/8/12 10:16

  • deepak267

  • Quite a regular

  • Posts: 352

  • Since: 2008/8/15


I have not tried by myself but You can use a database trigger to create the users on the second database. I guess it will work on one-way( means you have to keep one database as primary the user has to register only on primary).

Personally, I dont think it's a nice idea to share user database, it may be easier to create one website with 2 user groups. each group will have their own modules to access.

Hope this helps.

Deepak


6
redheadedrod
Re: Using an external database for users

You could likely do a cron task that would sync your databases with specific SQL statements.

This will likely not work well if you have alot of users but will work OK if you have only a few. As was already mentioned , you might be better off using one site and groups .


As I envision Multisite with the potential 2.6 Branch of Xoops it would work out of the box but currently there is nothing I am aware of that will work easily and a 2.6 Branch is only an idea at this point with not much support.

Rodney

Login

Who's Online

309 user(s) are online (239 user(s) are browsing Support Forums)


Members: 0


Guests: 309


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits