Jump to content

lost password


Deserteye

Recommended Posts

you cannot decrypt an md5 password.  all you can do is make a new one and send them the new password. 

as far as anybody being able to reset your password simply by knowing your email: here is what I do, and it may or may not be the best method, as i am no expert:

I have a field called temp_password. it is set to null by default. 

when you request a password reset, the script generates a temporary password and sends it to the email address, along with a "if you did not request this email, please report it or click on this linkie here", or whatever.  it's up to you what you want to do as far as "I didn't request this password change!" situations.  I try to log as many things as possible when a user requests a password change, such as the ip address, etc.. but those things only go so far as reliability.

the login script is then altered to not only check the normal password, but also see if temp_password is null or not, or if the user is trying to login with the temp_password.

if they login with the temp_password, prompt the user to change their password, and reset temp_password to null.

if they login with their old password, simply reset the temp_password to null.  you could also echo a message to the user warning them that (because the temp_password was not null), someone may have tried to reset their password, and give them the option to report it or something, in case they a) no longer have access to their own email, but obviously know their password, or b) haven't checked their email yet, or don't check it very often, so they wouldn't know about it.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.