Uma área de pesquisa sobre o WordPress para devs e autores do tema



email_exists ›

Desde2.1.0
Obsoleton/a
email_exists ( $email )
Parâmetros:
  • (string) $email Email.
    Required: Yes
Retorna:
  • (int|false) The user's ID on success, and false on failure.
Definido em:
Codex:

Determines whether the given email exists.

For more information on this and similar theme functions, check out the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ Conditional Tags} article in the Theme Developer Handbook.



Fonte

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