From cb4b90ebd8d278e774e49e8558ccb0ae422c46c8 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 27 Apr 2006 04:24:14 +0000 Subject: [PATCH] Return user ID if email exists. git-svn-id: https://develop.svn.wordpress.org/trunk@3753 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/registration-functions.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wp-includes/registration-functions.php b/wp-includes/registration-functions.php index 4805f45dac..59849e30da 100644 --- a/wp-includes/registration-functions.php +++ b/wp-includes/registration-functions.php @@ -13,9 +13,7 @@ function username_exists( $username ) { function email_exists( $email ) { global $wpdb; $email = addslashes( $email ); - $email_exists = $wpdb->get_row("SELECT user_email FROM $wpdb->users WHERE user_email = '$email'"); - if ( $email_exists) - return true; + return $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_email = '$email'"); } function validate_username( $username ) {