| Project: | User-Selectable Roles |
| Version: | 6.x-1.4 |
| Component: | Code |
| Category: | feature request |
| Priority: | minor |
| Assigned: | jazzslider |
| Status: | closed (fixed) |
Issue Summary
Hello!
In our setup, we recently had a need to block users from modifying which user-selectable role they'd chosen once they'd already chosen one. Ordinarily this would be handled by turning off the "Registration and user account forms" setting, but since we're using LDAP integration for auth, we don't use the normal Drupal registration process. As a result, I've rolled the attached patch, which adds one more option to the UI…"User can select roles more than once", which to preserve BC, is true by default.
If this new option is unchecked, users will not be able to switch to a different user-selectable role after they've chosen one, regardless of whether they chose it via registration or account editing.
Hope this helps someone!
Thanks,
Adam
| Attachment | Size |
|---|---|
| allowreselect.patch | 2.54 KB |
Comments
#1
This makes perfect sense when needing to bypass the registration page. Thanks for sharing the patch.
#2
This patch is being added on 6.x.1.5 ? So this issues can be closed, or maybe you coul add this patch to 6.x.1.6?
#3
I hadn't planned to apply the patch since its application is for a small niche of users. I'm not against doing so though.
#4
jazzslider,
If you don't mind creating another patch against the latest version of User-Selectable Roles I will apply it right away and issue a new release. No worries if not.
Thanks,
John
#5
Hello!
I've attached a tentative patch, but I haven't had the chance to test it out yet (apart from running a PHP lint check); I'll let you know once I've done so, but I thought I'd attach it anyway just to be proactive :)
Thanks!
Adam
#6
The existing 5.x/6.x branches of User-Selectable Roles have reached the end of their life cycle and no additional features will be added.
This patch can be applied to the current 6.x branch by those needing the functionality it provides. Thanks again for the contribution.