From 5dd92ab506706b0a041eb7c5398ceca4be474933 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 20 Aug 2019 10:26:43 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B02311=20-=20Add=20logs=20to=20logout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/logoff.php | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/pages/logoff.php b/pages/logoff.php index ee26f71bd..8ab6fa575 100644 --- a/pages/logoff.php +++ b/pages/logoff.php @@ -51,28 +51,51 @@ if (isset($_SESSION['auth_user'])) LoginWebPage::ResetSession(); +$bLoginDebug = MetaModel::GetConfig()->Get('login_debug'); +if ($bLoginDebug) +{ + IssueLog::Info("---------------------------------"); + if (isset($sAuthUser)) + { + IssueLog::Info("--> Logout user: [$sAuthUser]"); + } + else + { + IssueLog::Info("--> Logout"); + } + $sSessionLog = session_id().' '.utils::GetSessionLog(); + IssueLog::Info("SESSION: $sSessionLog"); +} + $aPluginList = LoginWebPage::GetLoginPluginList('iLogoutExtension'); /** @var iLogoutExtension $oLogoutExtension */ foreach ($aPluginList as $oLogoutExtension) { + if ($bLoginDebug) + { + $sCurrSessionLog = session_id().' '.utils::GetSessionLog(); + if ($sCurrSessionLog != $sSessionLog) + { + $sSessionLog = $sCurrSessionLog; + IssueLog::Info("SESSION: $sSessionLog"); + } + IssueLog::Info("Logout call: ".get_class($oLogoutExtension)); + } + $oLogoutExtension->LogoutAction(); } -/* -switch($sLoginMode) +if ($bLoginDebug) { - case 'cas': - $sCASLogoutUrl = MetaModel::GetConfig()->Get('cas_logout_redirect_service'); - if (empty($sCASLogoutUrl)) + $sCurrSessionLog = session_id().' '.utils::GetSessionLog(); + if ($sCurrSessionLog != $sSessionLog) { - $sCASLogoutUrl = $sUrl; + $sSessionLog = $sCurrSessionLog; + IssueLog::Info("SESSION: $sSessionLog"); } - utils::InitCASClient(); - phpCAS::logoutWithRedirectService($sCASLogoutUrl); // Redirects to the CAS logout page - break; + IssueLog::Info("--> Display logout page"); } -*/ $oPage = LoginWebPage::NewLoginWebPage(); $oPage->DisplayLogoutPage($bPortal);