News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Lullabot.com:
Single Sign-on across Sub-Domains in Drupal with No Extra Modules
March 03, 2010 @ 11:06:57

On the Lullabot.com blog there's a recent post from Nate Haug showing how you can set up a single sign on with Drupal even if your user crosses multiple sub-domains on your site. The technique is particularly handy in that it doesn't require any extra modules to be installed to make it work.

With the multitude of single sign-on modules out there for Drupal, it's easy to miss the fact that Drupal has a built-in single sign on mechanism already. No modules, no configuration, just 20 easy lines of PHP in your site's settings.php file. This solution works for a lot of clients, but the set of requirements is pretty specific as to when you can use this approach.

To make it work all sites must be on the same domain (just sub-domains of it), be using MySQL as your backend database and, if you're using clustered hardware, they need to be on the same cluster to be able to make the cross-database queries. Since Drupal can prefix tables so the settings for each site are split out, you can create a "shared table" by making a few changes in your master and slave configuration.

4 comments voice your opinion now!
single signon drupal tutorial mysql authentication


blog comments powered by Disqus

Similar Posts

Deepak Radhakrishnan\'s Blog: Configuring Apache - PHP - MySQL on Windows (WAMP Configuration)

Sameer Borate's Blog: Accessing Amazon Product Advertising API

Stefan Mischook's Blog: Installing PHP and MySQL on the Mac with MAMP

Smashing Magazine: Create A Christmas Wish List With PHP (For Beginners)

DevShed: The Switch Statement and Arrays


Community Events











Don't see your event here?
Let us know!


component security package language podcast introduction facebook overview hack series unittest code application framework install hhvm symfony2 release composer opinion

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework