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:
PeteMall 2010-11-24 08:06:38 +00:00
parent 42361800ad
commit 5e3fd53b7a
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}