Hold on... I need it encrypted after validated... What now???
On 28 jan, 15:53, Delirium tremens <[email protected]> wrote:
> I understood! I added it to BeforeFilter. It works!
>
> On 28 jan, 15:37, Delirium tremens <[email protected]> wrote:
>
> > I added:
>
> > $this->Auth->authenticate = $this->Account;
>
> > to login.
>
> > I added:
>
> > function hashPasswords( $data ) {
> > return $data;
> > }
>
> > to Account model.
>
> > After updating my account, $cakeDebug (my debug config is 2, so flash
> > is eternal) flashed my password hashed. Am I doing anything wrong?
>
> > On 27 jan, 21:34, Gonzalo Servat <[email protected]> wrote:
>
> > > On Tue, Jan 27, 2009 at 8:26 PM, Delirium tremens
> > > <[email protected]>wrote:
>
> > > > CakePHP 1.2 is encrypting passwords before validating them.
>
> > > > CakePHP 1.2 is trying to make us behave in a different way.
>
> > > > Are you behaving the CakePHP 1.2 way?
>
> > > > What are you doing now that you are not allowed to validate passwords?
>
> > > I take it you're talking about the AuthComponent? If so, yes it hashes
> > > passwords automagically so you basically just store the hashed password in
> > > your DB. If you don't want that, you can do something like this:
>
> > > $this->Auth->authenticate = $this->User; // or whatever ...
>
> > > Inside the User model, you could have:
>
> > > function hashPasswords( $data ) {
> > > return $data;
>
> > > }
>
> > > Instead of hashing the password, it just returns it unmodified (clear
> > > text).
>
> > > - Gonzalo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---