diff --git a/wp-admin/network/site-users.php b/wp-admin/network/site-users.php index fcd1a863d0..eb96158c08 100644 --- a/wp-admin/network/site-users.php +++ b/wp-admin/network/site-users.php @@ -138,7 +138,14 @@ if ( $action ) { case 'promote': check_admin_referer( 'bulk-users' ); $editable_roles = get_editable_roles(); - if ( empty( $editable_roles[ $_REQUEST['new_role'] ] ) ) { + $role = false; + if ( ! empty( $_REQUEST['new_role2'] ) ) { + $role = $_REQUEST['new_role2']; + } elseif ( ! empty( $_REQUEST['new_role'] ) ) { + $role = $_REQUEST['new_role']; + } + + if ( empty( $editable_roles[ $role ] ) ) { wp_die( __( 'Sorry, you are not allowed to give users that role.' ) ); } @@ -158,7 +165,7 @@ if ( $action ) { } $user = get_userdata( $user_id ); - $user->set_role( $_REQUEST['new_role'] ); + $user->set_role( $role ); } } else { $update = 'err_promote'; diff --git a/wp-includes/version.php b/wp-includes/version.php index 65193c4ed5..11a38e4384 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-beta1-40779'; +$wp_version = '4.8-beta1-40780'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.