Mam niewielki problem z Zend Auth

$auth = new Zend_Auth_Adapter_DbTable(null,'user','use_email','use_password'); $auth->setCredentialTreatment('? and use_activate = 1 and use_verify = 1 and use_block = 0'); $auth->setIdentity($data['mail']); $user = new Model_User(); $password = $user->getHashedPassword($data['password']); $auth->setCredential($password);
I to działa, ale nie sprawdza tego typu konta (jest wybierane w formularzu jako combobox).
Próbowałem tak:
$auth->setCredentialTreatment('? and ? and use_activate = 1 and use_verify = 1 and use_block = 0'); $auth->setCredential(array($password,$data['type'])); // $data['type'] -> zmienna dla typu uzytkownika z combobox
Próbowałem też tak:
$auth->setCredentialTreatment('? and use_role = .'$data['type']'. and use_activate = 1 and use_verify = 1 and use_block = 0');
Nie działa. Jest sposób, aby weryfikować usera po tych dwóch lub więcej zmiennych?
Mogę napisać sobie jakiegoś ifa, który będzie to weryfikował, ale może da się to zrobić za pomocą Zend Auth.