IsAuthorized()) { //the user got a new session, but has authorized by the stored cookie //change the sessid so the user can post a form successfully $request = \Bitrix\Main\Context::getCurrent()->getRequest(); if($request->getCookie("UIDH") <> '') { $sessid = \Bitrix\Main\UI\SessionExpander::getSignedValue($request["k"]); if($sessid !== false) { bitrix_sessid_set($sessid); $status = "SESSION_CHANGED"; } } } echo $status; \Bitrix\Main\Application::getInstance()->end();