How setCredentialTreatment works in Zend framework
Can anyone tell me what is the use of following statement and how it works in Zend Framework? setCredentialTreatment('SHA1(CONCAT(?, salt ))'); Try like this: $auth = Zend_Auth::getInstance(); $authAdapter = new Zend_Auth_Adapter_DbTable( Zend_Db_Table::getDefaultAdapter(), 'users', 'username', 'password', "CONCAT('$this->_salt', sha(?))" ); $authAdapter->setIdentity($username) ->setCredential($password); setCredentialTreatment tells the auth adapter how to check the user supplied password against the one in the database (or whatever passwords are being checked again). In your example, the ?