I'm finding that I cannot successfully protect the username for either a particular user or a particular role. The only way I'm able to prevent a user from editing their username is by disabling the option to "change own username" in the core permissions (screenshot of permission attached), which actually removes the form input altogether. I'm assuming this isn't normal, but I'm not sure what is causing the problem.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hunmonk’s picture

Status: Active » Closed (works as designed)

userprotect protections don't deal with the situation of a user editing their own fields. it does provide special role-based permissions for editing own email and password, but core already provides a role-based permission for editing own username, so it's unnecessary for userprotect to address this. what you have here is a display issue, which should be addressed in core or in a theme template.

timd.mackey’s picture

Aha, I misunderstood what this module was intended for, this explains a lot. I was thinking that I could use it to prevent a user rom editing their own fields. Thanks for clarifying :)

hunmonk’s picture

it can, for password and email -- core already handles username.