Make WordPress Core

Ticket #39204: 39204_1.patch

File 39204_1.patch, 776 bytes (added by abhishek kaushik, 8 years ago)

Replaced is_super_admin() with current_user_can( 'manage_network' ) on for first occurrence

  • src/wp-admin/users.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    122122                        wp_die(__('Sorry, you are not allowed to edit this user.'));
    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;
    128128                }