email_exists( string $email )
Determines whether the given email exists.
Description
For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.
Parameters
-
(Required) The email to check for existence.
Return
(int|false) The user ID on success, false on failure.
Source
File: wp-includes/user.php
function email_exists( $email ) {
if ( $user = get_user_by( 'email', $email) ) {
return $user->ID;
}
return false;
}
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |