I managed to get authentication to work by following the tutorial from this page http://planetcakephp.org/aggregator/items/2604-create-simple-user-authentication-using-cakephp%E2%80%99s-auth-component
How do I make sure when I’m in the register page, and the password and confirm password the user supplied doesn’t match, the password field will be repopulated with the value the user enter and not the hashed version of it?
Thanks,
Tee
I don’t think it’s necessary to figure this out because of the feature of password input.Also it would be difficult to do this since you’ve used the
Authcomponent.From the cookbook:The auth component will automatically hash the password field if the username field is also present in the submitted data
That means you will lost the original password data after your submit it.However,I think there’s a tricky way to approach that with javascript:adding a hidden type input in the register view file which is the same value but different name with
$form->input('password');,then you can retrieve it in the action to display in the password input text.e.g