Hi,

I have configured multisites in single codebase. However each site has seperate admin and user login. I want to make it single admin and user login for all my sites which created under sites folder. I mean, one admin should control all the sites. Same as if the user register in one site, he can also login to all the sites with same user information.

Anyone have idea over this help me?

Thank you!

regards,

Comments

4cornersusa.com’s picture

If I understand you correctly, I believe the solution you are looking for is to share the user table from the main database between the sites in your multisite. If so these are some links that may help with that.

Share tables across instances
http://drupal.org/node/22267

Multisite: one database, some shared and some unique content
http://drupal.org/node/119918

A very comprehensive answer:
Database table prefix (and sharing tables across instances)
http://drupal.org/node/2622

many comments on this post...
http://drupal.org/node/113770

govind123’s picture

Hi,

Thanks for your information. It was very helpful to me. I have ceated Multisites with single users registration.

I have one more doubt here. That is, I have login as a admin, in the home page I have given subdomains links. If I click that link next page again will ask username and password. I don't want this. I want, once I logged in I want to access all the sites which I have created by drupal. Is it possible?

If yes, Please give me your idea.

Thank you!

Regards,
Govind

Cybergarou’s picture

To remain logged in when you go to another site you must also share the sessions table. You may want to share other tables that are going to be the same across all of the sites such as the profile table. That way users don't have to maintain multiple copies of the same information for each site.

You may come across a bug where logging in on the site with the main tables works, but logging into a site that is using the shared tables won't work. The work around is to only allow people to login in on the site with the main tables. On the sites with the shared tables, disable the login and create a link to the login page of the main site. You can see an example of this login setup at my site listed in my profile.

govind123’s picture

Hi, Thanks for your information. I have shared the tables from main domain to subdomain "authmap,profile_fields,profile_values,role,sequences,sessions,users,users_roles" . However if I goto sub domain, still it asks the login again.

Where I made mistakes?

Thanks!

Anonymous’s picture

Read this article http://devbee.com/sharing_cookies_between_sub_doma

-----------------------------------------
CompuBase, websites and webdesign

govind123’s picture

hi,

Thanks for your information. I have read that article. Sameway I have changed my settings.php file. But still its asking username and password when I click the subdomain link. Can you give me more idea over this.Please?

FYI: I am running in my localhost. My main domain name is "http://govindaraj/". And sub domain name is "http://site1.govindaraj/, http://site2.govindaraj/".

Thank you!

Regards,
Govind