Ignore role selector in network admin user-edit. See #14435.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
42361800ad
commit
5e3fd53b7a
|
@ -131,7 +131,7 @@ if ( !is_multisite() ) {
|
||||||
$blog_prefix = $wpdb->get_blog_prefix();
|
$blog_prefix = $wpdb->get_blog_prefix();
|
||||||
if ( $user_id != $current_user->ID ) {
|
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:{}'" );
|
$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';
|
$_POST[ 'role' ] = 'contributor';
|
||||||
$delete_role = true;
|
$delete_role = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue