Function: get_currentuserinfo

get_currentuserinfo( )

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

Returns

boolean | WP_User

False on XMLRPC Request and invalid auth cookie, WP_User instance otherwise.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.