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

Top ↑

See also


Top ↑

Parameters

$email

(string)(Required)User's email address


Top ↑

Return

(bool|object) False on failure, User DB row object


Top ↑

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);
}


Top ↑

Changelog

Changelog
VersionDescription
3.3.0Use get_user_by()
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.