Topic: makeRandomPassword
open functions.inc.php (inc folder)
find (bottom line):
?>
add above:
////////////////////////////////////////////////////////
// Function: makeRandomPassword Version: 1.0
// Description: Make a random password
function makeRandomPassword() {
$salt = "abchefghjkmnpqrstuvwxyz0123456789";
$pass = "";
srand((double)microtime()*1000000);
$i = 0;
while ($i <= 7) {
$num = rand() % 33;
$tmp = substr($salt, $num, 1);
$pass = $pass . $tmp;
$i++;
}
return $pass;
}
this will be used for register.php and lostpass.php, and it could be useful elsewhere as well