diff options
Diffstat (limited to 'libs/Zend/Auth/Adapter/DbTable.php')
-rw-r--r-- | libs/Zend/Auth/Adapter/DbTable.php | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/libs/Zend/Auth/Adapter/DbTable.php b/libs/Zend/Auth/Adapter/DbTable.php index db64bcba9e..30bbd2478d 100644 --- a/libs/Zend/Auth/Adapter/DbTable.php +++ b/libs/Zend/Auth/Adapter/DbTable.php @@ -14,34 +14,34 @@ * * @category Zend * @package Zend_Auth - * @subpackage Zend_Auth_Adapter - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @subpackage Adapter + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: DbTable.php 18066 2009-09-10 18:47:53Z ralph $ + * @version $Id: DbTable.php 20096 2010-01-06 02:05:09Z bkarwin $ */ /** * @see Zend_Auth_Adapter_Interface */ -require_once 'Zend/Auth/Adapter/Interface.php'; +// require_once 'Zend/Auth/Adapter/Interface.php'; /** * @see Zend_Db_Adapter_Abstract */ -require_once 'Zend/Db/Adapter/Abstract.php'; +// require_once 'Zend/Db/Adapter/Abstract.php'; /** * @see Zend_Auth_Result */ -require_once 'Zend/Auth/Result.php'; +// require_once 'Zend/Auth/Result.php'; /** * @category Zend * @package Zend_Auth - * @subpackage Zend_Auth_Adapter - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @subpackage Adapter + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Auth_Adapter_DbTable implements Zend_Auth_Adapter_Interface @@ -58,7 +58,7 @@ class Zend_Auth_Adapter_DbTable implements Zend_Auth_Adapter_Interface * @var Zend_Db_Select */ protected $_dbSelect = null; - + /** * $_tableName - the table name to check * @@ -185,7 +185,7 @@ class Zend_Auth_Adapter_DbTable implements Zend_Auth_Adapter_Interface /** * setCredentialTreatment() - allows the developer to pass a parameterized string that is - * used to transform or treat the input credential data + * used to transform or treat the input credential data. * * In many cases, passwords and other sensitive data are encrypted, hashed, encoded, * obscured, or otherwise treated through some function or algorithm. By specifying a @@ -241,10 +241,10 @@ class Zend_Auth_Adapter_DbTable implements Zend_Auth_Adapter_Interface if ($this->_dbSelect == null) { $this->_dbSelect = $this->_zendDb->select(); } - + return $this->_dbSelect; } - + /** * getResultRowObject() - Returns the result row as a stdClass object * @@ -292,8 +292,8 @@ class Zend_Auth_Adapter_DbTable implements Zend_Auth_Adapter_Interface /** * authenticate() - defined by Zend_Auth_Adapter_Interface. This method is called to - * attempt an authenication. Previous to this call, this adapter would have already - * been configured with all nessissary information to successfully connect to a database + * attempt an authentication. Previous to this call, this adapter would have already + * been configured with all necessary information to successfully connect to a database * table and attempt to find a record matching the provided identity. * * @throws Zend_Auth_Adapter_Exception if answering the authentication query is impossible @@ -314,8 +314,9 @@ class Zend_Auth_Adapter_DbTable implements Zend_Auth_Adapter_Interface } /** - * _authenticateSetup() - This method abstracts the steps involved with making sure - * that this adapter was indeed setup properly with all required peices of information. + * _authenticateSetup() - This method abstracts the steps involved with + * making sure that this adapter was indeed setup properly with all + * required pieces of information. * * @throws Zend_Auth_Adapter_Exception - in the event that setup was not done properly * @return true @@ -340,7 +341,7 @@ class Zend_Auth_Adapter_DbTable implements Zend_Auth_Adapter_Interface /** * @see Zend_Auth_Adapter_Exception */ - require_once 'Zend/Auth/Adapter/Exception.php'; + // require_once 'Zend/Auth/Adapter/Exception.php'; throw new Zend_Auth_Adapter_Exception($exception); } @@ -391,7 +392,8 @@ class Zend_Auth_Adapter_DbTable implements Zend_Auth_Adapter_Interface * performs a query against the database with that object. * * @param Zend_Db_Select $dbSelect - * @throws Zend_Auth_Adapter_Exception - when a invalid select object is encoutered + * @throws Zend_Auth_Adapter_Exception - when an invalid select + * object is encountered * @return array */ protected function _authenticateQuerySelect(Zend_Db_Select $dbSelect) @@ -410,17 +412,17 @@ class Zend_Auth_Adapter_DbTable implements Zend_Auth_Adapter_Interface /** * @see Zend_Auth_Adapter_Exception */ - require_once 'Zend/Auth/Adapter/Exception.php'; + // require_once 'Zend/Auth/Adapter/Exception.php'; throw new Zend_Auth_Adapter_Exception('The supplied parameters to Zend_Auth_Adapter_DbTable failed to ' . 'produce a valid sql statement, please check table and column names ' - . 'for validity.'); + . 'for validity.', 0, $e); } return $resultIdentities; } /** - * _authenticateValidateResultSet() - This method attempts to make certian that only one - * record was returned in the result set + * _authenticateValidateResultSet() - This method attempts to make + * certain that only one record was returned in the resultset * * @param array $resultIdentities * @return true|Zend_Auth_Result @@ -442,8 +444,9 @@ class Zend_Auth_Adapter_DbTable implements Zend_Auth_Adapter_Interface } /** - * _authenticateValidateResult() - This method attempts to validate that the record in the - * result set is indeed a record that matched the identity provided to this adapter. + * _authenticateValidateResult() - This method attempts to validate that + * the record in the resultset is indeed a record that matched the + * identity provided to this adapter. * * @param array $resultIdentity * @return Zend_Auth_Result @@ -451,7 +454,7 @@ class Zend_Auth_Adapter_DbTable implements Zend_Auth_Adapter_Interface protected function _authenticateValidateResult($resultIdentity) { $zendAuthCredentialMatchColumn = $this->_zendDb->foldCase('zend_auth_credential_match'); - + if ($resultIdentity[$zendAuthCredentialMatchColumn] != '1') { $this->_authenticateResultInfo['code'] = Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID; $this->_authenticateResultInfo['messages'][] = 'Supplied credential is invalid.'; @@ -467,8 +470,8 @@ class Zend_Auth_Adapter_DbTable implements Zend_Auth_Adapter_Interface } /** - * _authenticateCreateAuthResult() - This method creates a Zend_Auth_Result object - * from the information that has been collected during the authenticate() attempt. + * _authenticateCreateAuthResult() - Creates a Zend_Auth_Result object from + * the information that has been collected during the authenticate() attempt. * * @return Zend_Auth_Result */ |