hasIdentity()){ $request = $this->getRequest(); if(count($request->getParams)>0){ $action = $request->getParam('action'); $login = $request->getParam('login'); $pass = $request->getParam('pass'); $checkIp = ($request->getParam('checkIp', '')=='only') ? true : false; if ($checkIp){ $auth = Zend_Auth::getInstance(); $authAdapter = new WebAuthAdapter($login, $pass, $checkIp); $result = $auth->authenticate($authAdapter); if (!$result->isValid()){ $this->view->message = ''; foreach ($result->getMessages() as $message) { $this->view->message.= $message."
"; } } else { $timeout = $auth->getIdentity()->timeout; $storage = new Zend_Auth_Storage_Session(); $sessionNamespace = new Zend_Session_Namespace($storage->getNamespace()); $sessionNamespace->setExpirationSeconds($timeout); $auth->setStorage($storage); $this->_redirect('/'); } } } $this->_redirect('/user/login'); } else { $bootstrap = $this->getInvokeArg('bootstrap'); $this->appConfig = $bootstrap->getOptions(); } } public function indexAction() { $this->_forward('entreprise', 'recherche'); } }