New starting in 6.x.2 is the concept of 'user defaults.' These settings are used to assign users to domains based on the user's site roles.

Click on the 'User defaults' tab to see the settings available.

By design, these settings are always added to a user's domains when a page is requested. That is, if you assign all 'authenticated users' to your first domain, one.example.com, then all authenticated users will be assigned to that domain.

This setting is most useful under the following conditions:

  • If you let anonymous users post content on your site. In this case, you should assign at least one domain to the anonymous user role, so that the module will assign anonymous posts to the appropriate domain(s).
  • If you use Domain Strict, you can use this setting to assign default access to specific roles.

Note that there are two options for how this setting behaves:

  • Add default roles dynamically [default] - This setting is the normal use and does not write individual records to the {domain_editor} table. Use this setting if you want to change options for each role quickly, as these are global settings, so taking away a domain will instantly apply to all users.
  • Add default roles to the user account - Use this setting if you want to automatically register users to specific domains or to save changes to a batch of users. When this setting is active, domain assignments are saved permanently to the {domain_editor} table and can only be removed by editing the user account.

You may also assign default domains for all new users of your site. To do so, simply select the domains that new users should be assigned to. If you make no selection, new users will automatically be assigned to the domain from which they enter the registration form.

Settings for the 'new user' are permanently saved to the user account.

See http://drupal.org/node/313629 for some background about this feature.

Batch Assignment of Users to Domains

In 6.x.2 and higher, users with the 'administer users' and 'assign domain editors' permissions may use the User administration page to batch assign users to domains.

This feature is useful if you need to convert a group of editorial users to become domain editors.

To use this feature, navigate to Administration > People (Drupal 7) or Administer > User management > Users (Drupal 6). Look for the 'Assign users to domains' option in the 'Update options' select form. Choose this operation and then use the 'Affiliate editor options' fieldset to select the domains you wish to assign users to.

Select the desired users and hit the Update button.

Note that this form also shows you a list of domains that a user is currently assigned to.

If these elements do not appear, you do not have the proper permissions.

Form Behavior

In 6.x.2.5 and higher, you may select one of two options when updating domains.

Under the 'Update behavior' form element, you may choose:

[] Replace old values with new settings
[] Add new settings to existing values
[] Remove selected domains from existing values

Choosing 'replace' will erase any current domain affiliation for the selected users and replace them with those entered into the form. Choosing 'add' will merge the new values with the existing values. Choosing 'remove' will remove the new values from the existing ones.

This new feature is helpful when you want to alter domain settings, but do not want all users to be assigned to the same domains.

Comments

Nicolas Bouteille’s picture

Hi,

I read the whole Domain Access documentation and I don't really understand what assigning users to domain means and implies.
By default I see that no domain is assigned to any role, not even admin.
What is the most common scenario?
Why would one need to assign domains to certain roles, what will happen if a role does not have a domain when it should...
Thanks!

Nick