Return user ID if email exists.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-04-27 04:24:14 +00:00
parent 45302e1c22
commit 8753af280c
1 changed files with 1 additions and 3 deletions

View File

@ -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 ) {