harish7986 / drupalauth

Automatically exported from code.google.com/p/drupalauth
0 stars 0 forks source link

Drupal multi-site #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
How does this work in a multi-site environment when you have multiple websites 
under the same Drupal installation and you only want one of them to be 
authenticated against?

Original issue reported on code.google.com by power.st...@gmail.com on 1 Apr 2011 at 1:23

GoogleCodeExporter commented 8 years ago
Adding the following to the contructor before calling bootstrap does the trick:

// Change this to the hostname for the site
$_SERVER['HTTP_HOST'] = 'www.example.com';

// Change MYSITENAME to the name of the directory for the site you want to use.
$_SERVER['SCRIPT_NAME'] = '/MYSITENAME'.$_SERVER['SCRIPT_NAME'];

Original comment by s...@moitozo.com on 21 Aug 2012 at 2:00