Метод refreshGuestCookie
Расположение
Исходный файл метода в Bitrix Framework
~/bitrix/modulesim/lib/V2/Guest/Auth/AuthorizationService.php
Исходный код
Сигнатура метода
public function refreshGuestCookie(): void
Возвращает:
void
Описание
Re-issues the auth cookie for the already-authorized guest of the current request. A returning guest keeps their PHP session, so authorize() is skipped and the HASH cookie is never refreshed — a cleared/corrupted BITRIX_IM_GUEST_HASH then fails the next guard check ({@see \Bitrix\Im\V2\Guest\GuestService::isCurrentGuestSessionValid}) and tears the session down. Re-issuing on re-entry self-heals it, symmetric to {@see self::setInviteCode}. XML_ID is read from the DB, not GetParam(): a session-restored CUser may not carry it.