Sharing user data

Events happening in the community are now at Drupal community events on www.drupal.org.
MkeHack's picture

Is it reasonable to have a user profile managed in a DB at the mutlisite root level which can also be shared with a child. The child sites would aslo have their own DB to manage user data unique to the child context. If this is reasonable what does the DB configrauation look like and how is the parent DB accessed from a child site?

Thanks in advance for your help

Steve

Comments

*_*

beautifulmind's picture

Since both the parent and child having own copy of configuration files, dbs can be manageable.
For the matter of accessing parent db data from the child, the child must set the parent db as active for a while and immediately turned to its own db.
This wont create any extra overhead except setting a db active. You can switch back and forth any time.

Regards.
:)
Beautifulmind

In the child site's

btopro's picture

In the child site's settings.php file put the following --

$db_prefix = array(
'default' => '',
'profile_fields' => 'parentdb.',
'profile_values' => 'parentdb.',
);

Where parentdb is your root database / site that you refer to as the parent. You can do this with users as well (which you'll need to or the uid's could be segmented from the data being written to that table). Here's what ours looks like to standardize child sites architecturally:

$db_prefix = array(
'default' => '',
'users' => 'courses.',
'authmap' => 'courses.',
'profile_fields' => 'courses.',
'profile_values' => 'courses.',
'role' => 'courses.',
);

hope this helps

"Plaguing the world with Drupal; One Plone, Moodle, Wordpress, Joomla user at a time since 2005." ~ btopro

http://elearning.psu.edu/
http://elearning.psu.edu/projects/
http://elearning.psu.edu/drupalineducation/

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week