I'm would think this had been fixed by now, but I can't find it anywhere. I had run into a -different- problem when getting duplicate role choices on the registration page, one with checks and one with radios and figured that the other guy who built the site did something weird. So i disabled, uninstalled and reinstalled the latest version. when I go to the registration page after selecting only 2 roles out of 7, I see all 7 choices. Hmm..

Now I've searched thru the issue queue and maybe I'm just being silly, but I am missing it. If so, please don't get mad at me, i'm just trying to help by submitting this fix, which makes the user roles you've chosen on the admin page show up correctly on the registration page:

On line 80 of autoassignrole.module, there is the in_array() function which should be array_key_exists() :

So :

if (!in_array($k, $user_roles)) {
...
----
becomes:

foreach ($roles as $k => $r) {

// mcn 6/10 - Changed in_array() to array_key_exists()
//
if (!array_key_exists($k, $user_roles)) {
unset($roles[$k]);
}
}

Comments

mchrisneglia’s picture

Title: Autoassign role properly reading user_role settings during registration » Autoassign role not properly reading user_role settings during registration

Never Mind, the issue is address here, my bad:

http://drupal.org/node/384702

See introfini's comment #4/#6

cyberswat’s picture

Version: 6.x-1.0-beta3 » 6.x-1.x-dev
Status: Needs review » Fixed

Hi there ... Please give the Drupal 6 dev version a try. I believe this has already been fixed but has not been pushed into a beta release just yet. Thanks for taking a look at it! I'm moving this ticket over to the dev branch and marking fixed ... feel free to re-open if it is stll an issue in dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.