If you have one role available for the user you cannot use the checkbox option which is only for multiple options. So I had to use the radio option and then the user cannot unselect the option. My preference would be to take away the restriction for the checkbox option allowing it for even one role. Hey why not?

Also you have help text such as 'Select one or more Account Types.' below the radio and checkboxes. Could you make this configurable? My preference for my application would be to eliminate it or reword it. Your words could imply to my users that they have to make a selection. I instead want to caution them of the responsibilities of making the role selection. You might even allow the admin to create an information message for each role listed.

Your module seems to be the best and only one that allows the user to select roles at registration and then edit it later. Thank you for it. I just need the above fixes to make it usable for my site.

Thanks for your help with this,

Jeff

Comments

johnhanley’s picture

You make a valid point regarding a single option and checkboxes (to allow the user to deselect the only available role, when role selection is not required.) Removing the restriction from the settings page makes sense. You can do this yourself by removing lines 114-116 in user_selectable_roles.module, which reads as follows:

    if (count(array_filter($form_state['values']['user_selectable_roles'])) == 1 && $form_state['values']['user_selectable_roles_mode'] == 1) {
      form_set_error('user_selectable_roles_mode', t("Multiple choice only allowed when there's more than one user-selectable role available and selected."));
    }

You can add some description (helper) text to the desired form element via a custom module and hook_form_alter().

You should also be able to alter the string text output with the String Overrides module.

webservant316’s picture

Thanks for getting back about that.

Do you plan to remove that restriction in the next release? I don't really want to maintain a modification to your module myself. I might forget on your next release.

johnhanley’s picture

Yeah, I'll remove the aforementioned validation code in the next release. I'm not sure when that will be though, which is why I included the fix here.

webservant316’s picture

Great, thanks.

johnhanley’s picture

Component: User interface » Code
Assigned: Unassigned » johnhanley
Category: support » bug
Status: Active » Fixed

The fix for this issue was just rolled into versions 6.x-1.6 and 5.x-1.6. Thanks again for reporting it.

webservant316’s picture

thanks

Status: Fixed » Closed (fixed)

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

spiritkarma’s picture

THANK YOU!!!! WOOOOHOOOO!
I was just running into this on my test site, now I can move forward without modifying ANOTHER module to get it to work.