Add LIMIT 1 to some of our gets.

git-svn-id: https://develop.svn.wordpress.org/trunk@3012 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2005-11-07 23:09:09 +00:00
parent c72a1f461e
commit 0069470818
2 changed files with 5 additions and 5 deletions

View File

@@ -37,7 +37,7 @@ function get_userdata( $user_id ) {
if ( $user )
return $user;
if ( !$user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID = '$user_id'") )
if ( !$user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID = '$user_id' LIMIT 1") )
return false;
$metavalues = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->usermeta WHERE user_id = '$user_id'");