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:
Ryan Boren
2006-06-05 16:52:21 +00:00
parent 27bc07a27f
commit f7e56ee9b3
7 changed files with 29 additions and 9 deletions

View File

@@ -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.'));
?>