Ejemplo n.º 1
0
 /**
  * @return Zend_Auth_Result
  */
 public function authenticate()
 {
     $result = AdminUser::checkCredencials($this->_identity, $this->_credential);
     if (is_array($result)) {
         return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $result);
     } elseif ($result === false) {
         return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID, null);
     } elseif (is_null($result)) {
         return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND, null);
     } else {
         return new Zend_Auth_Result(Zend_Auth_Result::FAILURE, null);
     }
 }