'email' and 'password'.
One has a flag deleteDate set and so it should be excluded in the result.
My first script:
$adapter->setTableName('members');
$adapter->setIdentityColumn('email');
$adapter->setCredentialColumn('password');
$adapter->setCredentialTreatment('PASSWORD(?) AND deletionDate IS NULL AND
blockDate IS NULL');
$adapter->setIdentity($values['email']);
$adapter->setCredential($values['password']);
Logging in failed for some reason.
I switched to this script:
$adapter->setTableName('members');
$adapter->setIdentityColumn('email');
$adapter->setCredentialColumn('password');
$adapter->setCredentialTreatment('PASSWORD(?)');
$adapter->setIdentity($values['email']);
$adapter->setCredential($values['password']);
$select = $adapter->getDbSelect();
$select->where('deletionDate IS NULL');
$select->where('blockDate IS NULL');
This worked fine. But the documentation says that these methods should react
equally, or not!?
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/Zend-Auth-Adapter-DbTable-additional-checks-tp676876p3050167.html
Sent from the Zend Auth mailing list archive at Nabble.com.
没有评论:
发表评论