When you re-add "peter", are you creating a new record for the username peter?
-Hector
--
-Hector
On Tue, Oct 14, 2008 at 11:02 PM, aSecondWill <willjbarker@gmail.com> wrote:
The manual shows how to add additional checks to the table auth adapter
http://framework.zend.com/manual/en/zend.auth.adapter.dbtable.html#zend.auth.adapter.dbtable.advanced.advanced_usage
but it switches the zend_auth_credential_match value returned rather than
limits the selection by the extra check.
If we have a soft delete field deleted, and i delete a user 'peter' and then
re-add him later on, he won't be able to log in because the check sql:
SELECT `user`.*, (CASE WHEN `password` = ('jelly') AND deleted = 0 THEN 1
ELSE 0 END)
AS `zend_auth_credential_match` FROM `user`
WHERE (`email` = 'peter@example.com.au')
created by
$authAdapter = new Zend_Auth_Adapter_DbTable($registry->dbAdapter, 'users',
'email', 'password', '(?) AND deleted = 0');
returns both records.
is there anything i can do to limit the records returned to just the not
'deleted' records?
Thanks for any help. Week 2 developing with zend. getting there slowly.
--
View this message in context: http://www.nabble.com/Zend_Auth_Adapter_DbTable-additional-checks-tp19987253p19987253.html
Sent from the Zend Auth mailing list archive at Nabble.com.
--
-Hector
没有评论:
发表评论