PHP password recovery

前端 未结 4 2046
星月不相逢
星月不相逢 2020-12-28 20:32

I realize that for security that passwords should not be stored in a DB as plaintext. If I hash them, I can validate them for login purposes.

But if I want to set u

4条回答
  •  情歌与酒
    2020-12-28 21:09

    You don't 'recover' passwords. What you do is one of 2 things.

    1. Email the user a link to create a new password, overriding the current one
    2. Email the user a randomly generated password, then ask them to change it

提交回复
热议问题