email_exists( string $email )
Checks whether the given email exists.
Parameters
-
(Required) Email.
Return
(int|false) The user's ID on success, and 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 |
---|---|
WP-2.1.0 | Introduced. |