mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-21 23:11:53 +01:00
Users: Use login__in
parameter for WP_User_Query
in WP_MS_Users_List_Table::prepare_items()
, instead of a manual query.
Props spacedmonkey. Fixes #45223. Built from https://develop.svn.wordpress.org/trunk@44813 git-svn-id: http://core.svn.wordpress.org/trunk@44645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c32464d7f1
commit
d2f9cbf7be
@ -26,11 +26,10 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
||||
/**
|
||||
* @global string $usersearch
|
||||
* @global string $role
|
||||
* @global wpdb $wpdb
|
||||
* @global string $mode
|
||||
*/
|
||||
public function prepare_items() {
|
||||
global $usersearch, $role, $wpdb, $mode;
|
||||
global $usersearch, $role, $mode;
|
||||
|
||||
$usersearch = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST['s'] ) ) : '';
|
||||
|
||||
@ -56,8 +55,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
if ( $role === 'super' ) {
|
||||
$logins = implode( "', '", get_super_admins() );
|
||||
$args['include'] = $wpdb->get_col( "SELECT ID FROM $wpdb->users WHERE user_login IN ('$logins')" );
|
||||
$args['login__in'] = get_super_admins();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.2-alpha-44812';
|
||||
$wp_version = '5.2-alpha-44813';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user