delocalizer and Dr. Loboto, It works a treat.
In the controller after fetching the data I unset the password field. The password then comes up blank in the edit form. I then entered the beforeValidate function, you gave me, in the model and it works perfectly. Thanks for your help. On Aug 24, 3:23 pm, delocalizer <conrad.leon...@hotmail.com> wrote: > Yes nice, I hadn't though of that. So you would test for: > if (isset($this->data['User]]['password']) && $this->data['User'] > ['password'] == Security::hash(Configure::read('Security.salt'))) > > On Aug 24, 1:27 pm, "Dr. Loboto" <drlob...@gmail.com> wrote: > > > > If you do this you'll have to hash your own password rather than let > > > Auth do it automatically, because Auth will hash a blank password and > > > the 'if' condition will never be true. > > > If do not touch Auth hashing behavior password field can be checked > > not as "notBlank" but by comparison with hashed empty string. --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---