get_user_to_edit( int $user_id ): WP_User|false

In this article

Retrieve user data and filter it.

Parameters

$user_idintrequired
User ID.

Return

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

Source

function get_user_to_edit( $user_id ) {
	$user = get_userdata( $user_id );

	if ( $user ) {
		$user->filter = 'edit';
	}

	return $user;
}

Changelog

VersionDescription
2.0.5Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.