Posted by tj2653 on April 27, 2008 at 8:54pm
| Project: | Role Control |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
I have role control provided only during registration. When a user in the role (provided during registration) updates their my account profile, and "maintain own role control" access ISN'T provided for them, they lose their role.
Comments
#1
Hmm, I hadn't originally planned for people being able to add a role during registration (I believe there are other modules that do this) and had made the obviously false assumption that if you allow someone to add a role during registration that they should have the power to maintain that role. If someone would like to figure out a fix for this I'd be more than happy to review it. I'm swamped with other work at the moment, but will look at it when I get a chance.
#2
On a site I'm running, I give users the ability to set a role during registration *and* when updating their account settings.
If the user edits the main account settings --- "/user/x/edit" --- and saves, the selected role is properly preserved.
If the user edits their profile.module profile --- "/user/x/edit/profile" --- and saves, the role_control checkbox is preserved, but the actual role is cleared.
I've attached a patch which solves this problem on my site --- if the role_control checkbox doesn't appear on the submitted form, it takes no action; if it does, it either adds or removes the role as usual.
#3
Thanks, I'm integrating this fix into 5.x-1.x-dev now.
-Elliot