Make WordPress Core

Ticket #19684: 19684.patch

File 19684.patch, 872 bytes (added by linuxologos, 13 years ago)
  • wp-admin/users.php

     
    101101                if ( ! current_user_can('promote_user', $id) )
    102102                        wp_die(__('You can’t edit that user.'));
    103103                // The new role of the current user must also have the promote_users cap or be a super admin
    104                 if ( $id == $current_user->ID && ! is_super_admin() && ! $wp_roles->role_objects[ $_REQUEST['new_role'] ]->has_cap('promote_users') ) {
    105                         $update = 'err_admin_role';
    106                         continue;
     104                if ( $id == $current_user->ID && ! $wp_roles->role_objects[ $_REQUEST['new_role'] ]->has_cap('promote_users') ) {
     105                        if ( ! ( is_multisite() && is_super_admin() ) ) {
     106                                $update = 'err_admin_role';
     107                                continue;
     108                        }
    107109                }
    108110
    109111                // If the user doesn't already belong to the blog, bail.