A WordPress-centric search engine for devs and theme authors



get_userdata ›

Since0.71
Deprecatedn/a
get_userdata ( $user_id )
Parameters:
  • (int) $user_id User ID
    Required: Yes
Returns:
  • (WP_User|false) WP_User object on success, false on failure.
Defined at:
Codex:

Retrieve user info by user ID.



Source

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

if ( ! function_exists( 'get_user_by' ) ) :