Changeset 19024
- Timestamp:
- 10/20/2011 02:12:25 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/users.php
r18911 r19024 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 caps71 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 the promote_users cap or be a super admin 71 if ( $id == $current_user->ID && ! is_super_admin() && ! $wp_roles->role_objects[ $_REQUEST['new_role'] ]->has_cap('promote_users') ) { 72 72 $update = 'err_admin_role'; 73 73 continue;
Note: See TracChangeset
for help on using the changeset viewer.