1
votes

I am using the auth component straight out the box. When a user enters their password it hashes it using the salt in my core.php file. Is there a way to manually hash a variable using this same method? Because I want the user to have the ability to change their password so say they enter the new password and I store it in $newPassword, how would I hash this in the same way to then insert into the database?

Thanks

Geoff

2

2 Answers

0
votes

on your change password just pass the username as a hidden field and cake will hash it auto, you can also check the method above or Security::hash() to do it manually.