/** * Action de autenticação do usuário * @return void */ public function autenticateAction() { if (!$this->getRequest()->isPost()) { $this->_redirect('/usuario-externo/logout'); } $formData = $this->_getAllParams(); $this->_persistDataError['data'] = $formData; if (isset($formData['captcha_code'])) { $this->getService('Usuario')->validateCaptcha($formData['captcha_code']); } $adapter = new Sica_Auth_Adapter($this->getService('UsuarioExterno')->userEntity(), $formData['email'], $formData['txSenha']); $adapter->setLdap(FALSE); $result = \Zend_Auth::getInstance()->authenticate($adapter); $this->_checkAutenticate($result); }