/** * 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); }
/** * Action de autenticação do usuário * @return void */ public function autenticateAction() { if (!$this->getRequest()->isPost()) { $this->_redirect('/'); } $formData = $this->_getAllParams(); $this->_persistDataError['data'] = $formData; if (isset($formData['captcha_code'])) { $this->getService()->validateCaptcha($formData['captcha_code']); } $adapter = new Sica_Auth_Adapter($this->_entity, Zend_Filter::filterStatic($formData['nuCpf'], 'digits'), $formData['txSenha']); $adapter->appendDataExtras(TRUE); $result = Zend_Auth::getInstance()->authenticate($adapter); $this->_checkAutenticate($result); }