2008年10月25日星期六

Re: [fw-auth] Zend_Auth_Adapter_DbTable and crypt($pass, $salt)

Hector Virgen wrote:
> I haven't tested it, but you can probably use the credentialTreatment
> option, but it'd be a bit of a hack:
>
> <?php
>
> |$authAdapter = new Zend_Auth_Adapter_DbTable($dbAdapter);
>
>
> $authAdapter
> ->setTableName('users')
> ->setIdentityColumn('username')
> ->setCredentialColumn('password')
> ->setCredentialTreatment('password')
> ;|
>
> ?>
>
> That (i think) would result in a SQL query that looks something like this:
>
> SELECT * FROM users WHERE username = 'bob' AND password = password

In fact it's a little bit tricky but works. At last i wrote class which
override 2 methods: _authenticateCreateSelect() and
_authenticateValidateResult()

Now it works like i want at first.

thanks for advice
bye
--
Piotr Kabacinski
kabot@seo.pl

没有评论: