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:
parent
e9eaabaf14
commit
33074d8c67
@ -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
|
||||
)
|
||||
) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user