Users: Use the role name instead of the role display name when fetching the list of users with no role. This avoids false positives when dealing with user roles that, for example, contain spaces in the display name.
Props procodewp, choongsavvii Fixes #38234 Built from https://develop.svn.wordpress.org/trunk@38787 git-svn-id: http://core.svn.wordpress.org/trunk@38730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
295e48baa9
commit
dec7dd74ea
|
@ -2440,7 +2440,7 @@ function wp_get_users_with_no_role() {
|
|||
}
|
||||
|
||||
$prefix = $wpdb->get_blog_prefix();
|
||||
$regex = implode( '|', wp_roles()->get_names() );
|
||||
$regex = implode( '|', array_keys( wp_roles()->get_names() ) );
|
||||
$regex = preg_replace( '/[^a-zA-Z_\|-]/', '', $regex );
|
||||
$users = $wpdb->get_col( $wpdb->prepare( "
|
||||
SELECT user_id
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38786';
|
||||
$wp_version = '4.7-alpha-38787';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue