當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Auth_Adapter_DbTable::_authenticateValidateResult方法代碼示例

本文整理匯總了PHP中Zend_Auth_Adapter_DbTable::_authenticateValidateResult方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Auth_Adapter_DbTable::_authenticateValidateResult方法的具體用法?PHP Zend_Auth_Adapter_DbTable::_authenticateValidateResult怎麽用?PHP Zend_Auth_Adapter_DbTable::_authenticateValidateResult使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Auth_Adapter_DbTable的用法示例。


在下文中一共展示了Zend_Auth_Adapter_DbTable::_authenticateValidateResult方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _authenticateValidateResult

 /**
  * Validate the identity returned from the database.
  *
  * Overrides the Zend implementation to provide user IDs, not usernames
  * upon successful validation.
  *
  * @param array $resultIdentity
  * @todo Should this instead override _authenticateCreateAuthResult()?
  */
 protected function _authenticateValidateResult($resultIdentity)
 {
     $authResult = parent::_authenticateValidateResult($resultIdentity);
     if (!$authResult->isValid()) {
         return $authResult;
     }
     // This auth result uses the username as the identity, what we need
     // instead is the user ID.
     $correctResult = new Zend_Auth_Result($authResult->getCode(), $this->_resultRow['id'], $authResult->getMessages());
     return $correctResult;
 }
開發者ID:lchen01,項目名稱:STEdwards,代碼行數:20,代碼來源:UserTable.php

示例2: _authenticateValidateResult

 protected function _authenticateValidateResult($resultIdentity)
 {
     if ($resultIdentity['domain_user']) {
         $ldap = new Base_Ldap();
         if (!$ldap->checkUserInLdap($this->_identity, $this->_credential)) {
             $this->_authenticateResultInfo['code'] = Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID;
             $this->_authenticateResultInfo['messages'][] = 'Supplied credential is invalid.';
             return $this->_authenticateCreateAuthResult();
         }
         unset($resultIdentity[$zendAuthCredentialMatchColumn]);
         $this->_resultRow = $resultIdentity;
         $this->_authenticateResultInfo['code'] = Zend_Auth_Result::SUCCESS;
         $this->_authenticateResultInfo['messages'][] = 'Authentication successful.';
         return $this->_authenticateCreateAuthResult();
     } else {
         return parent::_authenticateValidateResult($resultIdentity);
     }
 }
開發者ID:knatorski,項目名稱:SMS,代碼行數:18,代碼來源:Ldap.php


注:本文中的Zend_Auth_Adapter_DbTable::_authenticateValidateResult方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。