コード例 #1
0
ファイル: LoginController.php プロジェクト: Lazaro-Gallo/psmn
 /**
  * 
  * funcao que executa Esqueci minha Senha
  * 
  * @author ersilva
  * 
  * @return type
  */
 public function lostAction()
 {
     if (!$this->getRequest()->isPost()) {
         return;
     }
     $data = $this->_getAllParams();
     $enterprise = new Model_Enterprise();
     $result = $enterprise->lostPassword($data);
     switch ($result) {
         case "usuario_nao_existe":
             $this->view->messageError = "Usuário não encontrado com os dados informados";
             break;
         case "senha_enviada_para_email_cadastrado":
             $this->view->itemSuccess = true;
             break;
         default:
             $this->view->messageError = "Requisição não efetuada";
             break;
     }
     /*
     $createEnterpriseTransaction = $this->Enterprise
         ->createEnterpriseTransaction($data);
     
     if (!$createEnterpriseTransaction['status']) {
         $this->view->itemSuccess = true;
         $this->view->messageError = $createEnterpriseTransaction['messageError'];
         return;
     }
     */
     //$this->view->itemSuccess = false;
     //$this->view->messageError = "teste";   //$createEnterpriseTransaction['messageError'];
     return;
 }