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

Props spacedmonkey.
Fixes #43692.

git-svn-id: https://develop.svn.wordpress.org/trunk@43651 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2018-09-23 15:32:48 +00:00
parent e9eaabaf14
commit 33074d8c67
1 changed files with 1 additions and 1 deletions

View File

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