I need to disable/remove certain fields on the user profile page when a subadmin goes to edit a given user.
I’ve disabled the Application Passwords section via
wp_is_application_passwords_available_for_userhook, but I can’t find hooks for the other components.
I would like to similarly remove/disable Account Management. I want users to be able to change their own passwords, but not allow subadmins to change other user passwords.
I’ve disabled Role assignment and color schemes via plugins, which use WP hooks that I found, but that’s about as far as they go.
I’m using Ultimate Member for handling most of the user role/status ops. UM and various other role capability plugins allow user editing, but it’s an all or nothing setting. The plugins I’ve tried don’t provide for specificity in which fields are editable.
For now, all I want subadmins to be able to change are the emails and maybe nicknames of users with certain roles.
Are there WP hooks for these other fields that I’m overlooking that someone can point me to?
If not, is there a php way I can unset the desired fields on/after page load, or do I have to use something like a child rename/parent element destruction JS trick?
I generally avoid hiding elements via CSS wherever possible, but if that’s the only way to get this done…
- You must be logged in to reply to this topic.