PHP Forgot Password Function

后端 未结 12 855
后悔当初
后悔当初 2020-12-07 08:33

I have a small community website and I need to implement some sort of forgotten password function. I currently store the passwords in the DB, encrypted with MD5.

Is

12条回答
  •  暖寄归人
    2020-12-07 09:05

    You cannot decrypt the password, and you shouldn't even consider sending a password to a user via plaintext. (That is the #1 way to make me never ever use a site again; it's a GIGANTIC security hole.) Provide a password reset page that is triggered from a link containing a time-associated key that is sent to the user's password recovery email; that's the current state of the art in password recovery.

提交回复
热议问题