Hi

I am creating a multisite setup using domain access.But all of my sites will be paid so i don't need a common sign on.I tried using domain prefix by creating separate USERS table for each domain but it did not work fine. there were other node access related issues.

Can you suggest me a solution

Thank you.

CommentFileSizeAuthor
#7 image.PNG8.43 KBvinod.jain

Comments

agentrickard’s picture

Let each of the sites set its own login cookie.

vinod.jain’s picture

Thank you for the quick reply

for clearity lets say i have following sites
maindommain.com
sub1.maindomain.com
sub2.maindomain.com

I don't know much about cookies.

I think you are suggesting me to not modify the settings file for cookies so that a user will have to type his user name and password for each site(The same cookie will not be available for all the sites). (it might be a wrong understanding)

But still a user who registered from sub1.maindomain.com would be able to login on sub2.maindomain.com using the same username and password.

I need that the user should register separately for a site to login on that particular site.

agentrickard’s picture

What does this part of the original post mean?

"there were other node access related issues."

rkarajgi’s picture

Vinod:

I presume you have the drupal database to be shared between the various sites - that is - each site's settings.php file points to the same database.

You may want to check this http://drupal.org/node/56357

I hope this helps. Thanks

vinod.jain’s picture

Hi agentrickard -

What does this part of the original post mean?

"there were other node access related issues."

I mean the issues after using domain prefix.
I tried using domain prefix by creating separate USERS table for each domain.
Now i created a page on sub1.maindomain.com and promoted it to front page.This page will be visible to anonymous user also.
Now if i visit maindomain.com there will be a display
n/a
as if its a post

i could not figure out why.

agentrickard’s picture

You need to be more clear. I cannot follow what you are trying to say.

You need to describe the expected / desired behavior, the settings, and the actual behavior.

vinod.jain’s picture

StatusFileSize
new8.43 KB

ok agentrickard -

I have three sites
maindomain.com(base site)
sub1.maindomain.com
sub2.maindomain.com

all will be paid sites so a user should register for each site separately in order to login on that particular site.
Means if a user registers on sub1.maindomain.com he should be able to login only on sib1.maindomain.com not on maindomain.com and sub2.maindomain.com.

domain access uses a common USERS table for storing valid users' details. So if a user registers on sub1.maindomain.com he can login on other two sites also.
i have two type of users
1. super user (the first user of the site which i created at the time of installation)
2. site admin (have 'edit domain nodes' permission from 'domain module', don't have administer nodes permission)

i have enabled DomainConfig module also.

And have following Domain settings

Domain module behaviors:
------New content settings:Only show on selected sites

Advanced settings:
------Domain-based editing controls: Use access control for editors

Now i enable DomainPrefix and create domain_1_users table for sub1.maindomain.com and domain_2_users table for sub2.maindomain.com.

now i have three tables in database

users-> having single entry for super user
domain_1_users(for sub1.maindomain.com)->having entry for super user and a site admin who is assigned to sub1.maindomain.com
domain_2_users(sub1.maindomain.com)->having entry for super user and a site admin who is assigned to sub2.maindomain.com

now site admins can access noly there respective sites.
Now super user creates a page(say mainWelcome) and promotes it to front page.
site admin(sub1) creates a page(say sub1Welcome) and promotes it to front page.
site admin(sub2) creates a page(say sub2Welcome) and promotes it to front page.

Now if super user login on maindomain.com he will see three nodes as below

n/a

mainWelcome page

n/a

i have attached a screen shot

This is the problem from where these n/a comes.

agentrickard’s picture

This will need to wait until Monday, when I am back at home, unless someone else can take a crack at it.

Ibn al-Hazardous’s picture

How fast do you need to get this working?

I don't know what approach you used to the "prefixing users table"-solution - but I suppose you have to add a couple of users to the table before you start prefixing it for the different sites. Make sure that you have all your authors in with the same user ids in all of the users-tables. When you've done that, bump the prefix_users_uid value in sequencies to something safe (eg 1000) - so that you can add more authors to the tables manually. That way all your paying customers get uids from 1000 and upwards. Also, you can bump the prefix_users_uid value in sequencies to different values for different sites (so site1 users get uids starting on 10000, site2 users get uids starting 20000). That way you can merge the values at a later point if need be (and a better solution surfaces).

Tinkering with prefixed tables is probably your safest chance to get this working fast - and done right it'll still leave you room to switch solution later.

agentrickard’s picture

Status: Active » Closed (fixed)
drupal3008’s picture

Version: 5.x-1.7 » 6.x-1.2
Status: Closed (fixed) » Needs work

Since there was no real answer, I wish to reopen this.

I am trying to duplicate the functionality over at Warner Music where use drupal to manage their many artist websites.

I do not wish to have shared users between sites. I want to be able to register login "johndoe" and email "johndoe@yahoo.com" for each of my sites.

I've tried "creating" the users and users_roles tables so that each user can be put in its own prefixed table, but it doesn't work, cause when I check in the database, all users created are placed inside the "users" table, not the prefixed table.

But an interesting side now, each user I create, lets say I'm on a subsite (not the main root one), it should assign my new user to the subsite, but it's defaulting to the root one and I have to manually give it the subsite domain access.

agentrickard’s picture

Status: Needs work » Active
michaelfavia’s picture

I actually have a similar need for my new service. I am tentatively making the following module:

Link between user and the domain it was created on when users are added. Ability to assign a user to a domain with a select option on their user page. Setting to limit signon and user viewing to that domain.

Would it be of interest to you?

agentrickard’s picture

There was a patch that might be relevant to this problem -- #443836: Users gets assigned to default domain, not current

mrgoltra’s picture

subscribing.

agentrickard’s picture

Status: Active » Closed (fixed)

This issue is tangential to the main module, and there are no issue to solve.

See http://drupal.org/project/domain_bonus for the Domain Login Restrict module.

If you run into bugs or API limitations that prevent you from implementing this feature, please open a new issue.