mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-08 03:00:14 +00:00
Add more fine grained user management caps. Part 1. #2775
git-svn-id: https://develop.svn.wordpress.org/trunk@3846 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -34,7 +34,7 @@ case 'update':
|
||||
|
||||
check_admin_referer('update-user_' . $user_id);
|
||||
|
||||
if (!current_user_can('edit_users'))
|
||||
if ( !current_user_can('edit_user', $user_id) )
|
||||
$errors = new WP_Error('head', __('You do not have permission to edit this user.'));
|
||||
else
|
||||
$errors = edit_user($user_id);
|
||||
@@ -49,7 +49,7 @@ include ('admin-header.php');
|
||||
|
||||
$profileuser = new WP_User($user_id);
|
||||
|
||||
if (!current_user_can('edit_users'))
|
||||
if ( !current_user_can('edit_user', $user_id) )
|
||||
if ( !is_wp_error( $errors ) )
|
||||
$errors = new WP_Error('head', __('You do not have permission to edit this user.'));
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user