Fixed a bug where the system would crash if a user tried to recover their password.

This commit is contained in:
JT Smith 2002-12-09 06:00:41 +00:00
parent a96604507d
commit 24946858a4

View file

@ -444,7 +444,8 @@ sub www_recoverPasswordFinish {
$password .= chr(ord('A') + randint(32));
}
$encryptedPassword = Digest::MD5::md5_base64($password);
WebGUI::SQL->write("update users set identifier='$encryptedPassword' where userId='$userId'");
my $u = WebGUI::User->new($userId);
$u->identifier($encryptedPassword);
$flag = 1;
$message = $session{setting}{recoverPasswordEmail};
$message .= "\n".WebGUI::International::get(50).": ".$username."\n";