wordpress / latest / functions / get_userdata.html

get_userdata( int $user_id ): WP_User|false

Retrieves user info by user ID.

Parameters

$user_id int Required
User ID

Return

WP_User|false WP_User object on success, false on failure.

Source

File: wp-includes/pluggable.php. View all references

function get_userdata( $user_id ) {
	return get_user_by( 'id', $user_id );
}

Uses

Uses Description

Used By

Used By Description

Changelog

Version Description
0.71 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_userdata