When searching for users using the search arg in get_users()/WP_User_Query, also search the user's email, url, and display name.

Adds unit tests.

Props mordauk, wonderboymusic.
Fixes #27304.

Built from https://develop.svn.wordpress.org/trunk@32980


git-svn-id: http://core.svn.wordpress.org/trunk@32951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-06-28 00:36:24 +00:00
parent a59b2ffcae
commit 5b9b3cedea
2 changed files with 2 additions and 2 deletions

View File

@ -797,7 +797,7 @@ class WP_User_Query {
elseif ( preg_match('|^https?://|', $search) && ! ( is_multisite() && wp_is_large_network( 'users' ) ) )
$search_columns = array('user_url');
else
$search_columns = array('user_login', 'user_nicename');
$search_columns = array('user_login', 'user_url', 'user_email', 'user_nicename', 'display_name');
}
/**

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32979';
$wp_version = '4.3-alpha-32980';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.