$postData = $lastPostVars; $http->setSessionVariable('LastPostVars', $lastPostVars); } $user = false; if ($userLogin != '') { if ($http->hasSessionVariable("RedirectAfterLogin", false)) { $http->removeSessionVariable('RedirectAfterLogin'); } if ($ini->hasVariable('UserSettings', 'LoginHandler')) { $loginHandlers = $ini->variable('UserSettings', 'LoginHandler'); } else { $loginHandlers = array('standard'); } $hasAccessToSite = true; if ($http->hasPostVariable('Cookie') && $ini->hasVariable('Session', 'RememberMeTimeout') && ($rememberMeTimeout = $ini->variable('Session', 'RememberMeTimeout'))) { eZSession::setCookieParams($rememberMeTimeout); } foreach (array_keys($loginHandlers) as $key) { $loginHandler = $loginHandlers[$key]; $userClass = eZUserLoginHandler::instance($loginHandler); if (!is_object($userClass)) { continue; } $user = $userClass->loginUser($userLogin, $userPassword); if ($user instanceof eZUser) { $hasAccessToSite = $user->canLoginToSiteAccess($GLOBALS['eZCurrentAccess']); if (!$hasAccessToSite) { $user->logoutCurrent(); $user = null; $siteAccessName = $GLOBALS['eZCurrentAccess']['name']; $siteAccessAllowed = false;