From 24946858a4b84f51147f8b4a9b480dd4366cdcd9 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Mon, 9 Dec 2002 06:00:41 +0000 Subject: [PATCH] Fixed a bug where the system would crash if a user tried to recover their password. --- lib/WebGUI/Operation/Account.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Operation/Account.pm b/lib/WebGUI/Operation/Account.pm index b36d51232..219de64a8 100644 --- a/lib/WebGUI/Operation/Account.pm +++ b/lib/WebGUI/Operation/Account.pm @@ -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";