try this:
$authAdapter->setCredentialTreatment('? AND status=1')

however you should save your password encypted, and use something like this:
$authAdapter->setCredentialTreatment('PASSWORD(?) AND status=1')

niko

Am Freitag, 28. September 2007 schrieb Michael Raymond:
> Hi all,
>  
> How can I achieve to authenticate users only if the user match their
> password and the status is active?
>  
> (in the user table status field value 1=active; 0=inactive)
>  
> AuthController 
>  
>             $authAdapter->setTableName($config->system->userTableName);
>             $authAdapter->setIdentityColumn($config->system->userColumn);
>  
> $authAdapter->setCredentialColumn($config->system->passwordColumn);
>  
>             $authAdapter->setIdentity($post->username);
>             $authAdapter->setCredential($post->password);
>  
>             $auth = Zend_Auth::getInstance();
>             $result = $auth->authenticate($authAdapter);
>  

Reply via email to