My client has a drupal 6 site. This is used with there clients to project manage projects. We are building a new main website for our client using drupal (6/7 yet to be decided). They wish to have a login box on the home page of there new website that will log you into the project manage site. So something like:

Go to main website Enter user name and password for project site Website changes to project site with user logged in.

Would this be possible? The user would not have a login on the main site.

Both sites would be running on the same machine. Part of me is thinking that maybe multi-site could be my answer.

  • Hello Lucy, and welcome on Drupal Answers. Are all the sites subdomains of the same domain (e.g. test.example.com, support.example.com, private.example.com)?
    – apaderno
    Commented Mar 25, 2011 at 12:11
  • No. Each site has it's own top level domain.
    – user748
    Commented Mar 25, 2011 at 12:14

2 Answers 2


Sure it's possible. There are many ways to do this.

A simple solution, if both sites are running the same drupal version, would be to make a custom form, and connect to the other sites database, and get the login form. You would need to make sure that the submit path would go to the project manage site.

When the form is submitted, they would automatically go the that site, and if user/pass is correct, they would also be logged in.

Disclaimer: I haven't actually tried this before, but it should work just fine. Drupal wont know where the form was submitted, so should be the same as being on their project site and using the login form.

  • I will give it a shot.
    – user748
    Commented Mar 25, 2011 at 12:53
  • Can you explain be technically more I would like to implement as you have discussed in your answer. I have REST API for Both Site to Logged In can I use that thing to logged in How ?
    – AshwinP
    Commented Nov 25, 2013 at 12:31

What you are looking for is called Single Sign On (SSO).
There are many modules that do this in various ways. If they are on the same server you could potentially use the shared table approach. If they are on different servers you would have to use another approach. The Bakery module is what Drupal.org uses to auto log in you into groups.drupal.org. However, I'm not sure that works across top level domains.

  • Bakery doesn't work if the different sites are not on subdomains. It works for drupal.org, where the other sites are, e.g., groups.drupal.org, api.drupal.org.
    – apaderno
    Commented Mar 27, 2011 at 3:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.