Warning: This function has been deprecated. Use wp_get_current_user() instead.

get_currentuserinfo() WordPress Function

The get_currentuserinfo() function is a built-in function in WordPress that retrieves the current user's information. It is located in wp-includes/pluggable.php.

get_currentuserinfo() #

Populate global variables with information about the currently logged in user.


Description

Top ↑

See also


Top ↑

Return

(bool|WP_User) False on XMLRPC Request and invalid auth cookie, WP_User instance otherwise.


Top ↑

Source

File: wp-includes/pluggable-deprecated.php

function get_currentuserinfo() {
	_deprecated_function( __FUNCTION__, '4.5.0', 'wp_get_current_user()' );

	return _wp_get_current_user();
}


Top ↑

Changelog

Changelog
VersionDescription
4.5.0Use wp_get_current_user()
0.71Introduced.

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.