Users: Add LIMIT 1 to SQL query in WP_User::get_data_by(), as only one row is requested.

Props spacedmonkey.
Fixes #43692.
Built from https://develop.svn.wordpress.org/trunk@43651


git-svn-id: http://core.svn.wordpress.org/trunk@43480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-09-23 15:33:24 +00:00
parent 2e8c823212
commit 727cdc94c9
2 changed files with 2 additions and 2 deletions

View File

@ -240,7 +240,7 @@ class WP_User {
if ( ! $user = $wpdb->get_row(
$wpdb->prepare(
"SELECT * FROM $wpdb->users WHERE $db_field = %s",
"SELECT * FROM $wpdb->users WHERE $db_field = %s LIMIT 1",
$value
)
) ) {

View File

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