Return user ID if email exists.
git-svn-id: https://develop.svn.wordpress.org/trunk@3753 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d983d337d4
commit
cb4b90ebd8
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user