_authenticateCreateAuthResult example

$this->updateHash($plaintext$defaultEncoderName);
                } else {
                    $this->rehash($plaintext$hash$encoderName);
                }
            }
        }

        if (!$passwordValid) {
            $this->_authenticateResultInfo['code'] = Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID;
            $this->_authenticateResultInfo['messages'][] = 'Supplied credential is invalid.';

            return $this->_authenticateCreateAuthResult();
        }

        $this->_resultRow = $resultIdentity;

        $this->_authenticateResultInfo['code'] = Zend_Auth_Result::SUCCESS;
        $this->_authenticateResultInfo['messages'][] = 'Authentication successful.';

        return $this->_authenticateCreateAuthResult();
    }
}

    protected function _authenticateValidateResultSet(array $resultIdentities)
    {
        if (count($resultIdentities) < 1) {
            $this->_authenticateResultInfo['code'] = Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND;
            $this->_authenticateResultInfo['messages'][] = 'A record with the supplied identity could not be found.';

            return $this->_authenticateCreateAuthResult();
        } elseif (count($resultIdentities) > 1 && $this->getAmbiguityIdentity() === false) {
            $this->_authenticateResultInfo['code'] = Zend_Auth_Result::FAILURE_IDENTITY_AMBIGUOUS;
            $this->_authenticateResultInfo['messages'][] = 'More than one record matches the supplied identity.';

            return $this->_authenticateCreateAuthResult();
        }

        return true;
    }

    /** * _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 */
Home | Imprint | This part of the site doesn't use cookies.