A WordPress-centric search engine for devs and theme authors



email_exists ›

Since2.1.0
Deprecatedn/a
email_exists ( $email )
Parameters:
  • (string) $email Email.
    Required: Yes
Returns:
  • (int|false) The user's ID on success, and false on failure.
Defined at:
Codex:

Checks whether the given email exists.



Source

function email_exists( $email ) {
	if ( $user = get_user_by( 'email', $email ) ) {
		return $user->ID;
	}
	return false;
}