refresh_user_details( int $id ): int|false

In this article

Cleans the user cache for a specific user.

Parameters

$idintrequired
The user ID.

Return

int|false The ID of the refreshed user or false if the user does not exist.

Source

function refresh_user_details( $id ) {
	$id = (int) $id;

	$user = get_userdata( $id );
	if ( ! $user ) {
		return false;
	}

	clean_user_cache( $user );

	return $id;
}

Changelog

VersionDescription
3.0.0Introduced.

User Contributed Notes

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