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

elliot’s picture

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.

smokris’s picture

Status: Active » Needs review
StatusFileSize
new971 bytes

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.

elliot’s picture

Version: 5.x-1.0 » 5.x-1.x-dev

Thanks, I'm integrating this fix into 5.x-1.x-dev now.
-Elliot

smokris’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
StatusFileSize
new1.07 KB

The same problem occurs in 6.x-1.x. Here's the same patch, updated fox 6.x-1.x.

avpaderno’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

I am closing this issue, as it has been created for a release that is now not supported.