I have a problem referencing another database as a prefix in my settings.php
file.I have a master-site[mysite.local
] and a slave [sub.local
].Both of them are having separate database.I need to check the users table
of the master-site
as well as the users table of the slave site
,when a user tries to authenticate to the slave which is sub.local
.I tried adding the following in the settings.php file of the slave
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'sub_drupal', //Database for the slave site
'username' => 'root',
'password' => '',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => array(
'default' => 'sub_drupal.',
'users' => 'study.', //parent database
'sessions' => 'study.',
'role' => 'study.',
'authmap' => 'study.',
'users_roles' => 'study.',
),
),
),
);
But now it authenticates users only on the parent database.Is it not possible to authenticate users present in the slave database sub_drupal
and also in the parent database study
.Hope someone could help me with this.Thanks