get_user_to_edit

Advertisement

Summery Summery

Retrieve user data and filter it.

Syntax Syntax

get_user_to_edit( int $user_id )

Parameters Parameters

$user_id

(Required) User ID.

Return Return

(WP_User|bool) WP_User object on success, false on failure.

Source Source

File: wp-admin/includes/user.php

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

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

	return $user;
}

Advertisement

Changelog Changelog

Changelog
Version Description
2.0.5 Introduced.

Advertisement

Leave a Reply