} } if ($chosenGroupURI) { // if we've chose an URI from one of the user's groups. $redirectionURI = $chosenGroupURI; } } } } $userID = 0; if ($user instanceof eZUser) { $userID = $user->id(); } if ($userID > 0) { // Set eZVLogin cookies eZVLoginHelper::setUserCookie($user, $user->attribute('contentobject')->attribute('name')); if ($http->hasPostVariable('Cookie')) { $ini = eZINI::instance(); $rememberMeTimeout = $ini->hasVariable('Session', 'RememberMeTimeout') ? $ini->variable('Session', 'RememberMeTimeout') : false; if ($rememberMeTimeout) { if (class_exists('eZSession')) { // code for eZ Publish 4.1 eZSession::stop(); eZSession::start($rememberMeTimeout); } else { $GLOBALS['RememberMeTimeout'] = $rememberMeTimeout; eZSessionStop(); eZSessionStart(); unset($GLOBALS['RememberMeTimeout']); } }
// // // ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ## // //include_once( "lib/ezutils/classes/ezhttptool.php" ); //include_once( "kernel/classes/datatypes/ezuser/ezuser.php" ); include_once 'extension/ezvlogin/classes/ezvloginhelper.php'; $Module = $Params['Module']; // check if we're back from a SSO redirection loop if (($redirectionURI = eZVLoginHelper::isSSOStart($Module)) !== false) { // Makes sure this is not cached by proxy header('Cache-Control: no-cache, must-revalidate'); return $Module->redirectTo($redirectionURI); } $ini = eZINI::instance(); $user = eZUser::instance(); $http = eZHTTPTool::instance(); // Remove all temporary drafts //include_once( 'kernel/classes/ezcontentobject.php' ); eZContentObject::cleanupAllInternalDrafts($user->attribute('contentobject_id')); // Remove eZVLogin cookies eZVLoginHelper::setUserCookie($user); $user->logoutCurrent(); // HACK! seems to be no trigger for login/logout if (class_exists('sCacheCookieHelper')) { sCacheCookieHelper::setCookie(); } $http->setSessionVariable('force_logout', 1); $redirectURL = $ini->variable('UserSettings', 'LogoutRedirect'); // check if we're should do SSO or just do a normal redirect return eZVLoginHelper::doSSORedirect($Module, $redirectURL);