If a user has 1 non-selectable role that has a lower ID than a selectable role, for example

$user->roles = array(
  4 => 'Some admin-given role',
  15 => 'User selectable role',
);

The radio button is never prefilled, because of

        '#default_value' => $default_value[0],

The default value doesn't appear in #options, so the radio buttons are left empty. We need to filter out the default roles, so that $default_value is only the user's roles that are self-selectable.

Comments

djdevin’s picture

djdevin’s picture

Status: Active » Needs review
johnhanley’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

Closing due to Drupal 6 end-of-life cycle.