mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Ignore role selector in network admin user-edit. See #14435.
git-svn-id: https://develop.svn.wordpress.org/trunk@16563 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a221abd2ac
commit
6bf48a4d50
@ -131,7 +131,7 @@ if ( !is_multisite() ) {
|
||||
$blog_prefix = $wpdb->get_blog_prefix();
|
||||
if ( $user_id != $current_user->ID ) {
|
||||
$cap = $wpdb->get_var( "SELECT meta_value FROM {$wpdb->usermeta} WHERE user_id = '{$user_id}' AND meta_key = '{$blog_prefix}capabilities' AND meta_value = 'a:0:{}'" );
|
||||
if ( null == $cap && $_POST[ 'role' ] == '' ) {
|
||||
if ( !is_network_admin() && null == $cap && $_POST[ 'role' ] == '' ) {
|
||||
$_POST[ 'role' ] = 'contributor';
|
||||
$delete_role = true;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user