[support] Multisite help

Roberovsky Kuz roberovsky at hotmail.com
Mon Jul 15 19:33:45 UTC 2013


I need help sharing users with 2 sites

 

I have 2 sites sharing the same code, but each site has different database

 

Site 1

 

$databases = array (

  'default' => 

  array (

    'default' => 

    array (

      'database' => 'site1',

      'username' => 'user_db',

      'password' => 'password',

      'host' => 'localhost',

      'port' => '',

      'driver' => 'mysql',

      'prefix' => '',

    ),

  ),

);

 

Site 2

 

$databases = array (

  'default' => 

  array (

    'default' => 

    array (

      'database' => 'site2',

      'username' => 'user_db',

      'password' => 'password',

      'host' => 'localhost',

      'port' => '',

      'driver' => 'mysql',

      'prefix' => '',

    ),

  ),

);

 

Configuration to share tables between databases

 

$databases = array (

  'default' =>

  array (

    'default' =>

    array (

      'database' => 'site1',

      'username' => 'user_db',

      'password' => 'password',

      'host' => 'localhost',

      'port' => '',

      'driver' => 'mysql',

      'prefix' => array(

            'default'               => 'site1_',        

            'users'             => 'site2_',

      ),

    ),

  ),

);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20130715/db18c392/attachment.html 


More information about the support mailing list