W3cubDocs

/WordPress

get_userdata( int $user_id )

Retrieve 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

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

Changelog

Version Description
0.71 Introduced.

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