getControllerName()!='user' && $request->getActionName()!='login') { $auth = Zend_Auth::getInstance(); //Pas authentifié if (!$auth->hasIdentity()) { $auth->clearIdentity(); $session = new Zend_Session_Namespace('login'); $session->url = $_SERVER['REQUEST_URI']; $this->_response->setRedirect('/user/login'); //Authentifié => on met à jour la session } else { $timeout = $auth->getIdentity()->timeout; $storage = new Zend_Auth_Storage_Session(); $sessionNamespace = new Zend_Session_Namespace($storage->getNamespace()); $sessionNamespace->setExpirationSeconds($timeout); $auth->setStorage($storage); if (Zend_Session::namespaceIsset('login')){ Zend_Session::namespaceUnset('login'); } } } } }