Its  $this->User->validates( $this->data )  , not validate.  Cake has
a habit of executing any unknown function you call on a model as SQL.

You can still do it all in the model, just use the beforeValidate to
validate the password submitted is ok (number of chars, matches
confirm password etc) and then use beforeSave to MD5 the password.  As
you don't want to double MD5 a password it is probably best to have
separate fields, ie submit the form as "plain_password", and MD5 into
"hashed_password" (with the database only having a "hashed_password"
field).


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to