Jump to content

lost password script?


LanceT

Recommended Posts

To answer your initial question, have a user enter their email address (since, hopefully you're only allowing each email address to be used once), then run some sort of random password generator. Here's one that I've used in the past:

<?php
function generate() {
  $hash = md5(time());
  return substr($hash, 0, ;
}
?>

 

Then, just set their password to that value, and then send them an email with the updated password. Of course, make sure you have them confirm at least once that they do want it reset before you use this method ;)

Link to comment
https://forums.phpfreaks.com/topic/36742-lost-password-script/#findComment-175360
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.