public function formValidationAction() { $config = Config::getInstance(); $responseCnf = $config->getResponseConfigurations(); // Getting the form checkings configurations $loginForms = $config->getFormConfiguration(); $form = $loginForms->getForm(Config::FORM_LOGIN_SECTION); $request = $this->getRequest(); // Checking the validity of submited data // If bad submited data then somebody are trying to jump the client side verifications if (!$form->isValid($_POST)) { $msg = 'INVALID LOGIN because you have jumped the client side validations'; if ($request->isXmlHttpRequest()) { $msg = \Zend_Json::encode(array($responseCnf[Config::RESPONSE_MSG_NAME_PARAM] => $msg)); $this->_helper->getHelper('json')->sendJson($msg); } else { $view->msg = $msg; } } else { $msg = 'LOGIN OK'; if ($request->isXmlHttpRequest()) { $msg = \Zend_Json::encode(array($responseCnf[Config::RESPONSE_MSG_NAME_PARAM] => $msg)); $this->_helper->getHelper('json')->sendJson($msg); } else { $this->view->msg = $msg; } } }
public function outAction() { //@todo continuar con la destruccion de la session \Zend_Session::expireSessionCookie(); if (\Zend_Session::isStarted()) { \Zend_Session::destroy(true, true); } $config = Config::getInstance(); $responseParams = $config->getResponseConfigurations(); $this->_forward($responseParams[Config::RESPONSE_ACTION_PARAM], $responseParams[Config::RESPONSE_CONTROLLER_PARAM], $responseParams[Config::RESPONSE_MODULE_PARAM]); }