Somewhere in your bootstrapping you would have created and adapter that you
use to connect to your db.
This is the dbAdapter you pass in, for example:
*$dbAdapter = Zend_Registry::get('db');*
$authAdapter = new Zend_Auth_Adapter_DbTable($dbAdapter);
$authAdapter->setTableName('customers')
->setIdentityColumn('username')
->setCredentialColumn('password');
$password = hash('md5', SALT.$formData['password']);
$authAdapter->setIdentity($formData['username']);
$authAdapter->setCredential($password);
Thanks
Daniel Latter
2009/9/21 aaabbbcccdaabb <[email protected]>:
>
> To connect to table Animals I write:
> $model = new Model_DbTable_Animals();
>
> In documentation:
> http://framework.zend.com/manual/en/zend.auth.html
> I have:
> $authAdapter = new Zend_Auth_Adapter_DbTable(
> $dbAdapter,
> 'users',
> 'username',
> 'password'
> );
>
>
> But I don't have dbAdapter so what I should do ?
>
> --
> View this message in context:
http://www.nabble.com/I-don%27t-have-dbAdapter-so-how-can-I-create-authentication---tp25530253p25530253.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>