A WordPress-centric search engine for devs and theme authors



refresh_user_details ›

Since3.0.0
Deprecatedn/a
refresh_user_details ( $id )
Parameters:
  • (int) $id The user ID.
    Required: Yes
Returns:
  • (bool|int) The ID of the refreshed user or false if the user does not exist.
Defined at:
Codex:

Cleans the user cache for a specific user.



Source

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

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

	clean_user_cache( $user );

	return $id;
}