Esempio n. 1
0
 /**
  * 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);
 }