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.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | role_control-profile-edit-6.x.patch | 1.07 KB | smokris |
| #2 | role_control_profile_fix.patch | 971 bytes | smokris |
Comments
Comment #1
elliot commentedHmm, 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.
Comment #2
smokrisOn 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.
Comment #3
elliot commentedThanks, I'm integrating this fix into 5.x-1.x-dev now.
-Elliot
Comment #4
smokrisThe same problem occurs in 6.x-1.x. Here's the same patch, updated fox 6.x-1.x.
Comment #5
avpadernoI am closing this issue, as it has been created for a release that is now not supported.