Wednesday, February 4, 2009

Re: Does Auth automatic hash work only with specific actions?

Auth should hash the password anywhere.
It looks for $this->data['User']['password'] (or whatever you have
changed it to) on every request.
It will not hash $this->data[0]['User']['password'] for example.

You wrote "resetPassword controller". A typo right? Otherwise check
that Auth is included in that controller or globally.

I can't think of anything else that might cause this problem.

On Feb 3, 9:30 pm, Andrea Cardinale <mirt...@gmail.com> wrote:
> Hi guys, I really hope the answer to my question is yes, otherwise I
> can't understand what's going on.
> I have this two dummy functions in my user controller
>
>         function register() {
>                 debug($this->data);
>         }
>
>         function resetPassword($ticket=null) {
>                 debug($this->data);
>         }
>
> I build a view with a password field for both. The views are identical
> a part from this line
> <?php echo $form->create('User', array('action' => 'register'));?>
> <?php echo $form->create('User', array('action' => 'resetPassword'));?>
>
> So when I post the form from the register action the password in the
> debug message appear hashed when I post from the resetPassword
> controller it is not....
>  I just want to know either that I'm right or that I'm doing something
> wrong, what it matters is that I'm not getting crazy ;D
>
> Andrea
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: