Password recovery with sha1 password hashing
hash, password-protection, php
Solution
Short answer, you can't.
You want to implement a password reset function, not a password retrieval function. The whole point of hashing passwords is that you don't get to store the user's password, and you can't recover it if it is lost.
This should give you a rough idea of how to allow users to reset forgotten passwords:
Problem
I'd like to implement a forgot password function for my website. I hash the passwords using sha1. How would I recover this for the user? What's the best method for implementing this?