PDA

View Full Version : Member Script Editing



jwm123
17-08-2010, 02:57 PM
Hey everyone :)
Have got a basic Member Login script which stores email addresses and usernames.
The script works perfectly but I would like to add a forgot password form where the user types their email address and it emails them their password on file for them.

Didn't know if anyone could help with this? You would be allowed to keep the member login script for your own use or to sell if you wish once complete.

Thanks

MattFr
17-08-2010, 03:14 PM
The problem with emailing the password on database to them is that the password in the database should be hashed and salted which obviously can't be unencrypted on demand.

Apolva
17-08-2010, 03:56 PM
What Matt said, although you could have it email a reset link to change their password.

LMS16
17-08-2010, 06:40 PM
Heres what you do:

Created a form where they input their email, send them an email containing a link such as: http://site.com/forgot.php?email={email}&hash=FG5tgdfGHD

Make the forgot.php file add this key into their user table in the database and when they go there, check the hash, if it matches, then send them an email containing a new password :)

Lew.

Want to hide these adverts? Register an account for free!