diff --git a/wp-admin/includes/class-wp-users-list-table.php b/wp-admin/includes/class-wp-users-list-table.php index bf73df9e99..e78fa20312 100644 --- a/wp-admin/includes/class-wp-users-list-table.php +++ b/wp-admin/includes/class-wp-users-list-table.php @@ -300,6 +300,7 @@ class WP_Users_List_Table extends WP_List_Table { current_action() ) { $editable_roles = get_editable_roles(); $role = $_REQUEST['new_role']; + // Mocking the `none` role so we are able to save it to the database + $editable_roles['none'] = array( + 'name' => __( '— No role for this site —' ), + ); + if ( ! $role || empty( $editable_roles[ $role ] ) ) { wp_die( __( 'Sorry, you are not allowed to give users that role.' ), 403 ); } + if ( 'none' === $role ) { + $role = ''; + } + $userids = $_REQUEST['users']; $update = 'promote'; foreach ( $userids as $id ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 40a2560934..dd1e86fc45 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-beta1-50192'; +$wp_version = '5.7-beta1-50228'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.