2 site with the same DB of users

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
User avatar
gacon
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Sun May 21, 2006 7:41 pm
Contact:

2 site with the same DB of users

Post by gacon » Mon Oct 08, 2007 10:19 am

Hello all,

I have 2 sites (Joomla) on the same host: alo.ynghia.com (A) and video.ynghia.com (B).

I would like to:

- When users register into site A, he will be added automatically into site B
- And when users register into site B, he will be added automatically into site A

Which file i should modify?

thanks,
Ý Nghĩa . com http://www.ynghia.com/

User avatar
pvh123
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Wed Oct 05, 2005 7:25 am
Location: Amsterdam
Contact:

Re: 2 site with the same DB of users

Post by pvh123 » Tue Oct 09, 2007 11:31 am

Since your have two totally separate websites, it is not a simple matter of "changing a file".
You shoud really have a "portal" website for logging in and do the registrations on both websites.
Having said that, you still have to build the interfaces to both websites to do the registration part.
This will be complicated because that interface must contain the registration coding and be able to write the user information into both databases.
It also needs to take care of other user directed tasks if you want to keep everything synchronous, like "lost passwords" , removing users, etc.

I would not know of a simple solution.

Is there a way of merging the websites and use separate templates for the type of websites? That would make things a lot easier :)
;) pieter

User avatar
ianmac
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 237
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: 2 site with the same DB of users

Post by ianmac » Sat Oct 20, 2007 6:01 pm

gacon wrote:Hello all,

I have 2 sites (Joomla) on the same host: alo.ynghia.com (A) and video.ynghia.com (B).

I would like to:

- When users register into site A, he will be added automatically into site B
- And when users register into site B, he will be added automatically into site A

Which file i should modify?

thanks,


If you are running 1.5, I would look at building a user plugin that would handle the onAfterStoreUser event which could be used to sync the two user databases.

The other alternative would be to create an XML-RPC plugin that would serve as a remote auth module, and then write an authentication plugin to talk to this plugin.

Ian
Help test my Component XML Generator Tool!
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,1997/Itemid,35/
All feedback appreciated!


Post Reply