Warning: This function has been deprecated. Use get_user_by() instead.
get_user_by_email() WordPress Function
The get_user_by_email() function is used to get a user object by their email address. This function is useful for retrieving a user object when you know the user's email address but not their user ID.
get_user_by_email( string $email ) #
Retrieve user info by email.
Description
See also
Parameters
(string)(Required)User's email address
Return
(bool|object) False on failure, User DB row object
Source
File: wp-includes/pluggable-deprecated.php
function get_user_by_email($email) { _deprecated_function( __FUNCTION__, '3.3.0', "get_user_by('email')" ); return get_user_by('email', $email); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.3.0 | Use get_user_by() |
2.5.0 | Introduced. |