WordPress at a glance

email_exists() WP 1.0

Checks whether the given email exists.

Works based on: get_user_by()

No Hooks.

Return

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

Usage

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

Code of email_exists: wp-includes/user.php VER 4.9.8

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

Related Functions

From tag: Conditional tags (all)

More from category: Other

No comments
    Hello, !     Log In . Register