[support] User shared in two drupal site

Pierre Rineau pierre.rineau at makina-corpus.com
Sat Jul 31 11:59:04 UTC 2010


On Fri, 2010-07-30 at 12:56 -0300, Pablo L. de Miranda wrote:
> Take a look on the settings.php file, there has a information how you
> can share tables between one or more sites. So, you just can share the
> user and sessions table between your sites..
> 
> Att, 
> 
> Pablo Lacerda de Miranda
> Analista de Sistemas
> Pontifícia Universidade Católica de São Paulo
> pablolmiranda at gmail.com
> +55 11 8701-1086
> 
> -- 
> [ Drupal support list | http://lists.drupal.org/ ]

Sharing users directly from the database table can be somehow dangerous
or confusing, if you have many modules that keeps tracks of uid's in
their own tables you might experience serious malfunctions, data
de-synchronization, data overlapping, and weird behavior between sites.
The reason of this is that a user modification on one site won't trigger
any hooks on the others, implying potential de-sync between misc.
database tables and sites behaviors.

Still, it's do-able, but you need to really watch out for the modules
that does tricky things with users, and you will probably have to share
more than one table (don't forget session sharing as well if you want
unified auth).

Personnaly, I would rather aptempt to find or code a specific module
that is able to authenticate users from one site to another, and
duplicate needed data between two sites, at first auth aptempt, then in
cron or using some scripts.

Pierre.





More information about the support mailing list