Here is the code that might make a bit more sense:

$authAdapter = new Zend_Auth_Adapter_DbTable(<yourconnectioninfo>);
$authAdapter->setTableName('your_table_name');
$authAdapter->setIdentityColumn('username');
$authAdapter->setCredentialColumn('password');
$authAdapter->setIdentity($password);
$authAdapter->setCredential($password);

$auth = Zend_Auth::getInstance();
$result = $auth->authenticate($authAdapter);

*....and then continue with looking to see if the user was valid...*



Chris.




cjant83 wrote:
> 
> My suggestion would be to set everything up as if you required a
> username and password; a column in your users table for a
> id,username,password. On the front end only have a password field for
> the user to complete.
> 
> In your auth controller instead of passing a value into
> setIdentity($username) from a form, pass the password
> 
> setIdentity($password);
> 
> Every user in your users table would have the same value in the
> username and password column. By doing this each 'user' would be
> unique as you could assign an id to them.
> 
> The problem is someone might choose the same password. The way around
> this would be to make a check when you register a new user or setup a
> new password that the value is unique.
> 
> Dont know if thats the best way, but what came to my mind. If it
> doesnt make sense let me know ill try explain better :)
> 
> Chris.
> 
> 
> 
> 
> 2008/4/30 Denis Fohl <[EMAIL PROTECTED]>:
>> Hi all,
>>
>> i'm trying to simplify the authentification process as my client would
>> like
>> to have only one input field to fill with password.
>>
>> As it is documented, the identity column must contain unique values but,
>> in
>> this case, the identity should be the same for each user.
>>
>> Is there a way to do so ?
>>
>> Thank you.
>>
>> Denis.
>>
>>
>>
> 
> 
> 
> -- 
> Chris.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/authenticate-only-with-password-with-database-adapter---tp16979051p16986217.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to