Same users on two or more different Drupal sites?
rusloc - November 13, 2009 - 18:58
Curious noob's question: Is it possible to link two or more Drupal sites so that once a user registers on one of them, he/she becomes a member of the others as well? That would allow him to login with the same name/password. I would think it's about sharing the same mysql database, or at least some tables in it...
If it is possible, what are hidden or obvious issues of such an arrangement?
If this has already been discussed, I would appreciate a lead to such a discussion.
Thank you

=-=
Yes this is possible its called a multsite and you set it up to share the users tables based on the array in settings.php where this is also some documentation. There is also a few screencasts around that explain this.
Thank you for the idea but...
Some folks express concerns about using multisite scenario for sharing db info. Look at this one:
"native multisite was never really meant for anything beyond running sites from a shared codebase for ease of sw maintainence-- it always makes me nervous to mess with the db directly in ways that are non-standard."
If you ask me, it makes sense.
Also, when I searched Drupal.org for "multisite", I mainly found some abandoned modules, very little discussion of the subject, and a link to a pretty sad site. Sad - because it was kinda neglected and spammed to a hilt by commercial "comments". This inactivity surrounding the subject could be a sign of something wrong with the idea, lack of its popularity. Don't you think so?
=-=
When quoting someone it would be of benefit to link to the comment so that others can understand the context and note the date of the discussion. If it was back when Drupal was still using 3 digit versioning then a specific comment may have been relevant at that time. Or the commentor may be biased toward their own way of doing things.
edit: Matter of fact, I'm confused by use of the quote and its usage here. I don't disagree with the quoted commentor. Why not use a shared code base if you are sharing databases or database table? Makes complete sense to me.. However I'd stay away from sharing a single database and prefixed tables and use one DB for each site. This will help minimize the size of a single database.
That aside, you can write a custom module to bridge the two separate instances together or investigate a module that provides some sort of single sign on type of thing but that isn't sharing users as much as it is sharing sessions.
If you throw those two options out too, then I don't know what options you've left.
Don't I think so?
I disagree that what you cite is a lack of popularity.
First, multisite and sharing tables in the database doesn't require modules and doesn't require touching the database. The array simply puts the user in both databases. If it wasn't standard why is it in the settings.php file? This procedure is also included in the INSTALL.txt of drupal. It's documented in the documentation section. Videocasts, screencasts, and conferences have been created and held around the subject.
My shared sites work perfectly well and have been since D5, sharing multiple tables including but not limited to the user table.
My advice is to set up a test site and test the theory before you shoot it down based on a users comment who didn't like the idea. For every person who didn't like it, I'd bet there are two who do.
If your interested in actually trying the method before finding more random comments by users who dislike the idea, watch http://www.slideshare.net/jvandyk/multisite-van-dyk-walkah-presentation where drupal author, contributor and lullabot walks through how it's done.
anywho, good luck.
Your staunch attitude convinced me
That's what I was looking for. Now, I will follow your advice, and set up a playground to test my ideas hands-on.
Thanks for your great input.
_
FWIW, that quote sounds like something I frequently say, but I'm not sure.
That said, currently I would recommend the http://drupal.org/project/bakery module, which is what drupal.org is using for *.drupal.org, if the sites share the same toplevel domain, or http://drupal.org/project/multisite_login if they don't.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
subscribe
subscribe
Yes, I quoted you
Thanks for your thought provoking, questions-generating post of the last year, and the leads in today's post.
=-=
Very convienient of you to "partially" quote WF's statement in http://drupal.org/node/632234#comment-2264270
In future when you quote someone, consider quoting the entire sentence rather than leaving off pieces, or acronyms. Unless of course you are part of the broader media community where misquotes, and misrepresentation of facts is a SOP : )
off-topic?
Let me decide it, okay? And let's stop further discussions of my quoting habits. It is off-topic.
=-=
Actually, I don't view it as offtopic at all. You introduced the partial quote into this thread thereby making it part of the topic. Matter of fact you used it as the basis of a previous comment. : )
As it stands the context of where the quote was coming from was uber important to this discussion. The OP of the linked thread was trying to do something outside the box and the scope of what you are asking to do and the quote corrected the OP's course.