I have a notEmpty
validation rule set to my password field. The problem is, the AuthComponent auto hashes the string. So if the password is empty it will turn into a hash before the validation so it will appear not empty when hashed, but the actual plain text password is empty.
The best solution I can think of is to make the AuthComponent not hash an empty string. Can anyone tell me how to do that? or a better solution?
An idea: you could reset the password in the
beforeValidate
callback method of your user model like: