Ticket #18164: 18164.2.diff
File 18164.2.diff, 792 bytes (added by , 13 years ago) |
---|
-
wp-admin/users.php
67 67 68 68 if ( ! current_user_can('promote_user', $id) ) 69 69 wp_die(__('You can’t edit that user.')); 70 // The new role of the current user must also have promote_users caps 71 if ( $id == $current_user->ID && !$wp_roles->role_objects[$_REQUEST['new_role']]->has_cap('promote_users') ){70 // The new role of the current user must also have promote_users caps unless he is a network admin 71 if ( $id == $current_user->ID && ( !is_super_admin( $current_user->ID ) && !$wp_roles->role_objects[$_REQUEST['new_role']]->has_cap('promote_users') ) ) { 72 72 $update = 'err_admin_role'; 73 73 continue; 74 74 }