WordPress at a glance

email_exists() WP 1.0

Checks whether the given email exists.

For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.

Works based on: get_user_by()

No Hooks.


Int/false. The user's ID on success, and false on failure.


email_exists( $email );
$email(string) (required)


Since 2.1.0 Introduced.

Code of email_exists() WP 5.5.1

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

From tag: Conditional tags (all)

More from category: Other

No comments
    Log In . Register