I want to know whether it is possible in Domain Access module to assign users to their respective domains. I have been looking at domain user default module lately and I can't say whether it is capable of doing this or not.

Does anyone have a clue?

Thank you.

CommentFileSizeAuthor
#7 domain_login_restrict.zip1.05 KBdrupalok
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

agentrickard’s picture

Status: Active » Closed (fixed)

This is a core feature. See section 4.10 of README.txt.

You need this patch, too: #443836: Users gets assigned to default domain, not current

drecute’s picture

Status: Closed (fixed) » Active

Thanks.

what I mean is this. If a user registers at sub.domainA.com, will he automatically be registered only to that domain? My reason for this is that I registered a user on sub.domainA.com and I was able to use the login details to register at domainA.com, which is a little bit absurd to me.

I was thinking the user at sub.domainA.com should only be able to login at sub.domainA.com and if a module like singlesignon is installed, he can be allowed to carry his session to domainA.com or sub2.domainA.com.

agentrickard’s picture

That is not what most people want, and not why the module was designed.

If that is the behavior you want, then do not set $cookie_domain. Then Drupal should set a different login cookie (and session) for each domain, and you can use Single Sign On if you wish.

drupalok’s picture

i need this functionality too, and i dont think cookie_domain will help. A user would still be able to login to the second domain even if he is only registered at the first one. am i wrong?

is there any module that can achieve this? and if not, where would i have to start to program it myself?

thanks in advance!

agentrickard’s picture

Status: Active » Closed (works as designed)

It says very clearly that Domain Access "allows you to share content and users across a network of sites."

In these other cases, you have two options:

1) Use normal Drupal multisite, not Domain Access.

2) Use Domain Prefix to prefix the {users} and {users_roles} tables for each site (use the Copy option to move only user 0 and user 1 before you create new accounts). But if you run MySQL in strict mode, you will run into this bug --> #445386: Copying "users" table fails

In the case of Domain Prefix, user registrations and logins will then be checked against the database table used by the current domain.

drupalok’s picture

thanks for the info.
domain access is really a great module and much better than a normal multisite!

we are working on a module to provide this functionality...

prefixing user table was not an option, as some users are assigned to multiple domains

greeting and thanks...

drupalok’s picture

Status: Closed (works as designed) » Fixed
FileSize
1.05 KB

we created a module so users can only login to a domain they are assigned to.
works for us, check it out

drecute’s picture

Status: Fixed » Active
agentrickard’s picture

Status: Active » Closed (works as designed)

As far as the main module goes, this is 'by design' and will not be changed.

#7 should be released as a stand-alone module.

drecute’s picture

Status: Closed (works as designed) » Active

hi drupalok,

nice module. i guess u guys beat us to it. Cos myself and a friend were working on one as well. My question is does your module automatically assign users to a domain on creation or using domain access it just register that user to the current domain at which it was created.

Thanks.

drecute’s picture

drupalok’s picture

@agentrickard
i am under the impression you are kind of annoyed by my postings... i am sorry if i did something wrong. i did not want to argue with you in any way. your module is just great!

@drecute
the module does not change the registering of domain access
unfortunately at the moment all users from all domains get registered to the main domain
see:
http://drupal.org/node/443836

it says the patch has been commited but i dont think there is a release yet

agentrickard’s picture

Title: Assigning users to their respective domains using Domain module » Domain login restrict module
Component: - Domain User » Miscellaneous
Category: support » feature

Well, I'm just trying to unclutter my queue to get the stable release out. (see #12). Issues like this slow that down.

See #443296: Tasks for stable release

Retitling for clarity.

drecute’s picture

From your response, that means login details from non-main domain can used to logon to the primary domain. But for example, user at sub.primarydomain.com cannot log on to sub2.primarydomain.com and vice-versa.

This is just the way I understand it.

agentrickard’s picture

Status: Active » Closed (fixed)

This has been released over at http://drupal.org/project/domain_bonus