Hi all, have someone a document, pdf, link, other that can explain me how to create a system where when a user is logged into site A, him/her is loggend in site B ? And for the registration, too.
M.
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@gmail.com +55 11 8701-1086
Pablo L. de Miranda ha scritto:
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..
Two different db/server ??? Ah, thanks.
M.
Using the settings.php shared behavior your sites should be inside the same db/server using a differents prefix and the user/sessions table using the same prefix. A example: Web site A settings.php $db_prefix = array( 'default' => 'site_a_', 'users' => 'shared_', 'sessions' => 'shared_', 'role' => 'shared_', 'authmap' => 'shared_', );
Web site B settings.php $db_prefix = array( 'default' => 'site_b_', 'users' => 'shared_', 'sessions' => 'shared_', 'role' => 'shared_', 'authmap' => 'shared_', );
Using diferents servers and dbs, maybe you should think about another authentication type, something based on directories. Write your own authentication module is always a option.
Att,
Pablo Lacerda de Miranda Analista de Sistemas Pontifícia Universidade Católica de São Paulo pablolmiranda@gmail.com +55 11 8701-1086
On Fri, Jul 30, 2010 at 5:08 PM, Michel Morelli michel@ziobuddalabs.itwrote:
Pablo L. de Miranda ha scritto:
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..
Two different db/server ??? Ah, thanks.
M.
-- Michel 'ZioBudda' Morelli michel@ziobuddalabs.it Sviluppo applicazioni CMS DRUPAL e web dinamiche (LAMP+Ajax) Telefono: 0200619074 Telefono Cell: +39-3939890025 -- Fax: +39-0291390660
http://www.ziobudda.net ICQ: 58351764 http://www.ziobuddalabs.it Skype: zio_budda http://www.ziodrupal.net MSN: michel@ziobuddalabs.it JABBER: michel@ziobuddalabs.it
-- [ Drupal support list | http://lists.drupal.org/ ]
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@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.