add_script("window.location.href='{$sUrl}pages/logoff.php?portal=$bPortal'"); $oPage->output(); exit; } if ($bPortal) { $sUrl .= 'portal/'; } else { $sUrl .= 'pages/UI.php'; } if (isset($_SESSION['auth_user'])) { $sAuthUser = $_SESSION['auth_user']; UserRights::Login($sAuthUser); // Set the user's language } $sLoginMode = isset($_SESSION['login_mode']) ? $_SESSION['login_mode'] : ''; LoginWebPage::ResetSession(); switch($sLoginMode) { case 'cas': $sCASLogoutUrl = MetaModel::GetConfig()->Get('cas_logout_redirect_service'); if (empty($sCASLogoutUrl)) { $sCASLogoutUrl = $sUrl; } utils::InitCASClient(); phpCAS::logoutWithRedirectService($sCASLogoutUrl); // Redirects to the CAS logout page break; } $oPage = LoginWebPage::NewLoginWebPage(); $oPage->no_cache(); $oPage->DisplayLoginHeader(); $oPage->add("