email_exists
Filters whether the given email exists.
Usage
add_filter( 'email_exists', 'wp_kama_email_exists_filter', 10, 2 );
/**
* Function for `email_exists` filter-hook.
*
* @param int|false $user_id The user ID associated with the email, or false if the email does not exist.
* @param string $email The email to check for existence.
*
* @return int|false
*/
function wp_kama_email_exists_filter( $user_id, $email ){
// filter...
return $user_id;
}
- $user_id(int|false)
- The user ID associated with the email, or false if the email does not exist.
- $email(string)
- The email to check for existence.
Changelog
| Since 5.6.0 | Introduced. |
Where the hook is called
email_exists
wp-includes/user.php 2111
return apply_filters( 'email_exists', $user_id, $email );