teknoid posted an article about his method of doing it. Either way should work just fine; Martin's might be a little easier to manage. http://teknoid.wordpress.com/2008/10/08/demystifying-auth-features-in-cakephp-12/
On Aug 14, 2:50 am, Martin Westin <[email protected]> wrote: > When do you do this validation? > Saving a User record or logging n? > > If it is logging in then IMHO all is fine. Auth should hash anything > that comes in. blank password = wrong pasword and all that... > > If you are editing or creating users then you can name the password > field in the edit form to something like "new_password" and bypass > Auth. Then you use hash the password in the Model after validation but > before saving. That may not be the ultimate way to go, but it works. > Anyone with a better way please chime in. > > On Aug 13, 6:44 pm, Adam <[email protected]> wrote: > > > > > Auth with data validation in my User model doesn't pick up the > > notEmpty condition -- it hashes the empty string. > > > Is this correct? > > > Do i need to add custom validation to check for this? I cannot use > > $this->Auth->password() in a Model. > > > Or is there a better way to handle this? Thanks!- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
