IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
122 | 122 | wp_die(__('Sorry, you are not allowed to edit this user.')); |
123 | 123 | // The new role of the current user must also have the promote_users cap or be a multisite super admin |
124 | 124 | 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' ) ) ) { |
126 | 126 | $update = 'err_admin_role'; |
127 | 127 | continue; |
128 | 128 | } |
… |
… |
|
321 | 321 | $update = 'remove'; |
322 | 322 | foreach ( $userids as $id ) { |
323 | 323 | $id = (int) $id; |
324 | | if ( $id == $current_user->ID && !is_super_admin() ) { |
| 324 | if ( $id == $current_user->ID && !current_user_can( 'manage_network_users' ) ) { |
325 | 325 | $update = 'err_admin_remove'; |
326 | 326 | continue; |
327 | 327 | } |
… |
… |
|
377 | 377 | foreach ( $userids as $id ) { |
378 | 378 | $id = (int) $id; |
379 | 379 | $user = get_userdata( $id ); |
380 | | if ( $id == $current_user->ID && !is_super_admin() ) { |
| 380 | if ( $id == $current_user->ID && !current_user_can( 'manage_network_users' ) ) { |
381 | 381 | /* translators: 1: user id, 2: user login */ |
382 | 382 | echo "<li>" . sprintf(__('ID #%1$s: %2$s <strong>The current user will not be removed.</strong>'), $id, $user->user_login) . "</li>\n"; |
383 | 383 | } elseif ( !current_user_can('remove_user', $id) ) { |