Drupal Login in other site

mayur.pimple's picture

Hi
I have 5 drupal site with different code and database.

When I login in one drupal site then i want same login in other sites. How to maintain session or cookies in other sites.

Comments

Try Bakery module

rahulbile's picture

You Should try Bakery module

You should be implementing a

saitanay's picture

You should be implementing a Single Signon Solution using https://drupal.org/project/bakery or similar.

More documentation about Bakery SSO @ https://drupal.org/node/567410

Cheers
Tanay

--
Tanay Sai
Bangalore
skype: tanay.co.in

Sorry abt posting the same

saitanay's picture

Sorry abt posting the same solution again. Looks like we both posted at the same minute ;-)

Cheers
Tanay

--
Tanay Sai
Bangalore
skype: tanay.co.in

Below format will work

jackenmail's picture
        $form_state = array();
        $form_state['values']['name'] = REQUEST1;
        $form_state['values']['pass'] = REQUEST2;
        $form_state['values']['op'] = t('Log in');
    $form_state['values']['form_build_id'] = "";
    $form_state['values']['form_id'] = "user_login_block";

        drupal_execute('user_login', $form_state);
        drupal_goto($base_url);

Go to settings.php there is option there.

mehuls's picture

Go to settings.php
There is an option for setting up session cookie name as shown in following code.
Use same cookie name in all the site's setting.php and it should work for you.

/**
* Drupal automatically generates a unique session cookie name for each site
* based on its full domain name. If you have multiple domains pointing at the
* same Drupal site, you can either redirect them all to a single domain (see
* comment in .htaccess), or uncomment the line below and specify their shared
* base domain. Doing so assures that users remain logged in as they cross
* between your various domains. Make sure to always start the $cookie_domain
* with a leading dot, as per RFC 2109.
*/
# $cookie_domain = '.example.com';

Mehul
+91 777 888 2772

thanks

mayur.pimple's picture

thanks

SSO implementation using openID

RavindraSingh's picture

Hi @mayur.pimple I am also working on the similar kind of functionality. Did POC on openID which is working on different drupal instances (On different servers). Its filling my primary requirements because I have saprate drupal instance on different servers. See the detail - https://drupal.org/project/openid_sso_provider.

Still I did not took final decision to goahead on specific solution. update you on any other solution if found.

Hi

mayur.pimple's picture

Hi Ravindra
I have create different login page and set username and password in session. that form will auto submit .

India

Group organizers

Group events

Add to calendar

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: