Make WordPress Core


Ignore:
Timestamp:
01/24/2017 11:03:07 AM (7 years ago)
Author:
flixos90
Message:

Multisite: Replace is_super_admin() with manage_network_users when trying to change the role of oneself.

Props abhishek kaushik.
Fixes #39204. See #37616.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/users.php

    r39937 r39943  
    123123        // The new role of the current user must also have the promote_users cap or be a multisite super admin
    124124        if ( $id == $current_user->ID && ! $wp_roles->role_objects[ $role ]->has_cap('promote_users')
    125             && ! ( is_multisite() && is_super_admin() ) ) {
     125            && ! ( is_multisite() && current_user_can( 'manage_network_users' ) ) ) {
    126126                $update = 'err_admin_role';
    127127                continue;
Note: See TracChangeset for help on using the changeset viewer.