After enabling autoassignrole module, i set some roles for users to choose, and make it required.
Then i create a user from backend, found there're two forms for selecting roles, this may cause conflicts.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anzi31’s picture

FileSize
108.82 KB

This occurs only if you have both Automatic and User Choice enabled.

anzi31’s picture

Component: Miscellaneous » Code
Status: Active » Needs review
FileSize
709 bytes

When a user with a role that has the "Administer users" permission visits the admin/people/create, and the "user role assignment" is enabled, then the "user choice" fieldset should be hidden to avoid confusion.

Possible patch:
a. In autoassignrole.module, change:

function autoassignrole_form_user_register_form_alter(&$form, &$form_state) {
if (variable_get("autoassignrole_user_active", 0)) {

to

function autoassignrole_form_user_register_form_alter(&$form, &$form_state) {
if (variable_get("autoassignrole_user_active", 0) && !user_access('Administer users')) {

amitgoyal’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me!

drumm’s picture

Status: Reviewed & tested by the community » Needs work

"administer users" should not be capitalized.

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
709 bytes

This fixes the issue drumm mentioned in #4.

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed.

DamienMcKenna’s picture

Status: Fixed » Closed (fixed)

Closing this to clean up the issue queue as 7.x-1.0-beta1 was released.