I'd like to be able to share a member database between two web sites, but I don't know if it's possible to do it more cleanly than allowing cross-site logins.
The problem with the latter, where you login to another web site with (for example) telex4@drupal.org, is that it's a bit messy and possibly confusing for people who may sign up to either one of the two web sites. They'd have to remember which site they signed up to, login separately for both, and lists of members / profile links / etc. would look messy.
It would be much better if the person just had one username that worked across both, and displayed as the same on both.
Having the two web sites basically work off the same codebase and database, but splitting the one site into what looks like two web sites, isn't really an option.
Is there any other way to achieve this with Drupal?
Comments
Database sharing is the best option..
Hi,
You can go fro table sharing between sites. go through this link, it helps you.. http://drupal.org/node/22268
Sunny
www.gleez.com | www.sandeepone.com
Aha, thanks. I added the
Aha, thanks. I added the following to the settings.php file for the second web site:
$db_prefix = array(
'default' => '',
'users' => 'rr_current.',
'sessions' => 'rr_current.',
'role' => 'rr_current.',
'authmap' => 'rr_current.',
'sequences' => 'rr_current.',
'profile_fields' => 'rr_current.',
'profile_values' => 'rr_current.',
'permission' => 'rr_current.',
'users_roles' => 'rr_current.',
);
And I can now login to both sites using the same details. However I've noticed that I don't have admin rights on the second web site. When editing my profile I can see the 'administrator' role ticked, but the permissions obviously aren't set-up on the second site to give that role the necessary access rights. Are there other tables I need to share, or a trick I've missed somewhere?
no ideas on it
I havent shared roles between sites, so no ideas on it. I use different permissions for different sites.
I'll do some testing and get back to you
Sunny
www.gleez.com | www.sandeepone.com
Thanks for your help, I'll
Thanks for your help, I'll post if I find anything too.
Possibly modules
Aha, on a hunch I commented out the prefix block, create a new superuser and enabled all the modules that are enabled for the primary site. Then I reintroduced the prefix block, logged in and hey presto it seems to work.
I'll post if I find any other problems...
nice progress
I fall into simular situation now, now i need to test more, one of my clienst need to access both the site with sharing userbase and permissions. I need to share the roles table now, i hope it should work. i'll post soon
Sunny
www.gleez.com | www.sandeepone.com