3 years, 2 months ago
I want to prevent a specific role user (which has some admin rights, let’s say moderator) to edit other users’ settings like changing email and password. Is there any way to do that with a hook in functions.php?
Thanks for any help!
Yes, that is possible by removing the following capabilities from the role:
Once it is removed from the role then users from that particular role will not be able to create/edit/delete users.
Please follow this link: https://codex.wordpress.org/Function_Reference/remove_cap
@prashantvatsh you are absolutely right. Thanks for your reply!
See also: WordPress.org •
Follow BuddyPress on Twitter •
Contact Us •
Terms of Service