refresh_user_details

The timeline below displays how wordpress function refresh_user_details has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.7

/**
 * Cleans the user cache for a specific user.
 *
 * @since 3.0.0
 *
 * @param int $id The user ID.
 * @return int|false The ID of the refreshed user or false if the user does not exist.
 */
function refresh_user_details($id)
{
    $id = (int) $id;
    $user = get_userdata($id);
    if (!$user) {
        return false;
    }
    clean_user_cache($user);
    return $id;
}

WordPress Version: 5.3

/**
 * Cleans the user cache for a specific user.
 *
 * @since 3.0.0
 *
 * @param int $id The user ID.
 * @return bool|int The ID of the refreshed user or false if the user does not exist.
 */
function refresh_user_details($id)
{
    $id = (int) $id;
    $user = get_userdata($id);
    if (!$user) {
        return false;
    }
    clean_user_cache($user);
    return $id;
}

WordPress Version: 4.1

/**
 * Cleans the user cache for a specific user.
 *
 * @since 3.0.0
 *
 * @param int $id The user ID.
 * @return bool|int The ID of the refreshed user or false if the user does not exist.
 */
function refresh_user_details($id)
{
    $id = (int) $id;
    if (!$user = get_userdata($id)) {
        return false;
    }
    clean_user_cache($user);
    return $id;
}

WordPress Version: 3.7

function refresh_user_details($id)
{
    $id = (int) $id;
    if (!$user = get_userdata($id)) {
        return false;
    }
    clean_user_cache($user);
    return $id;
}