Usage

Parameter

Return

If the E-mail exists, function returns the ID of the user to whom the E-mail is registered.

If the E-mail does not exist, function returns false.

Examples

If the E-mail exists, echo the ID number to which the E-mail is registered. Otherwise, tell the viewer that it does not exist.
<?php$email = 'myemail@example.com';$exists = email_exists( $email );if ( $exists ) { echo 'That E-mail is registered to user number ' . esc_html( $exists );} else { echo 'That E-mail doesn\'t belong to any registered users on this site';}?>