wpseek.com
A WordPress-centric search engine for devs and theme authors



get_user_to_edit › WordPress Function

Since2.0.5
Deprecatedn/a
get_user_to_edit ( $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 data and filter it.



Source

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

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

	return $user;
}