Whitecobra Whitecobra - 2 months ago 12
MySQL Question

rehash passwords in fpass

So I followed coding cages tutorials just to create a simple register and login website. After 3 days (I shouldn't study 2 in the night every night) I found the problem...

Anyway, now everything works except from the "forgot password" page, because when I enter a new password, it wont get hashes again..

Anyone know how to rehash the forgot password?

Link to the tutorial: http://www.codingcage.com/2015/09/login-registration-email-verification-forgot-password-php.html

And I'm really sorry for all my bad questions here..

Answer Source

This seems to be a mistake on this tutorial.

To fix this just change

$stmt->execute(array(":upass"=>$cpass,":uid"=>$rows['userID']));

to

$stmt->execute(array(":upass"=>md5($cpass),":uid"=>$rows['userID']));

in Resetpass.php.

Let me know if that worked!