WordPress Capabilities: edit_user vs edit_users

I found a few references to edit_user as a capability, one of which is this:

// Allow user to edit itself
    if ( 'edit_user' == $cap && isset( $args[0] ) && $user_id == $args[0] )
    break;

http://core.trac.wordpress.org/browser/tags/3.5.2/wp-includes/capabilities.php#L1005

I believe the comment in that block of code answers this question.

Per @PatJ, it looks like map_meta_cap converts (in a sense) edit_user into edit_users but only if the user attempting to edit the profile is the profile’s owner, thus allowing users who otherwise have no user edit capabilities to edit their own profile information.

Leave a Comment