Hopefully the title covers it, but here is an explanation of what I'm trying to do.
I want multiple sites on one server and all I want to share are the users, but I want to have different roles in each database. From that point of view, I know that I need to share:
users, sequences
I am unsure whether or not I need to share any of the following and could do with some advice in this area:
authmap, sessions
And I am pretty certain that each database needs to have its own version of the following tables:
role, users_roles
My original intention was not to share content as I would like each site to have it's own specific CCK content types. However the decision on what to do here is further complicated by the fact that I am using nodeprofile, usernode and nodefamily to create the user profiles.
I intend to have users only able to register through the main site which may make things easier.
What I really need is a full list of which tables I should share and which tables I should not share under this scenario.
As usual, all help is gratefully received!
Regards
Patrick
Comments
My experience with multiple sites
I'm doing a similar thing. I have users shared across two sites, but I'm keeping the profiles separate on each site. I doubt that you can have different roles, because the second site would need to know the rid of the shared users when they log in. Let's see if I can explain myself. If you have one site with a user named Bob who is in the role Editors, when Bob goes to the second site, his user id and sessions info is valid because it's shared with the first site, but the second site will have no clue about what role Bob is a part of, so I suspect it won't let him log in. Can you set up a test site and try it out?
Hope it's helpful,
duggoff
Dugoff, Yes I will. I'm sure
Dugoff,
Yes I will. I'm sure I did this before back in 4.6.x days but those sites are no longer active and I can't remember what I did.
My thinking was that every user would have the authenticated user role anyway (even if it had to be copied from the first database) so they would be able to log in. The point you've made also raises the question as to whether or not the sessions table should be shared or seperate.
Will set up the test site this evening.
Regards
Patrick Nelson
UnderDesign - View portfolio
www.vcommunity.org.uk
Successfully shared users with different roles
Well, I managed to get it to work with regards to having different roles on each site. To achieve this I shared the following tables after reading node/22267.
All I need to do now is figure out how to share the profiles. How did you do it, duggoff? Have you shared all the content across both sites, or have you managed to find a way to share only the nodeprofile information?
Regards
Patrick Nelson
UnderDesign - View portfolio
www.vcommunity.org.uk
Anything further?
I'm also starting to use Drupal on multiple sites.
I've shared the users, sessions, authmap and sequences tables but I'm still at a loss as to how to share the user profiles. I'm also using nodeprofile which complicates the process.
Anyone have anything further to add to this topic?
Still alive?
This thread is useful - however, I'm not convinced about shared roles. $user->roles looks like this in Drupal 5.x:
What happens if two independent sites have the same role ID for different roles? Roles don't use the sequences table (perhaps they should??) so the core database has no "memory" of previous use of another RID. So it's entirely possible RID = 3 is admin on one site and some sort of extended basic user on another. Which would be bad! Could Drupal potentially allow access to content which should not be accessed if roles are not shared? It would appear so to me, but I haven't tested it yet.
--
http://www.drupaler.co.uk/
--
https://www.codeenigma.com/