From 75d1722236c57c0d10f37307997211afeeb7ba54 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Thu, 29 Jun 2006 16:34:18 +0000 Subject: [PATCH] Fix requesting a new password. Missed a user::update() -> user::update_password() call. Add a more explicit message in the case where the user doesn't enter any email address. --- account.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/account.php b/account.php index b0da9b5..a94b961 100644 --- a/account.php +++ b/account.php @@ -143,11 +143,19 @@ function cmd_do_new() */ function cmd_send_passwd() { - $aClean = array(); //array of filtered user input $aClean['ext_email'] = makeSafe($_POST['ext_email']); + /* if the user didn't enter any email address we should */ + /* ask them to */ + if($aClean['ext_email'] == "") + { + addmsg("Please enter your email address in the 'E-mail' field and re-request a new password", + "green"); + redirect(apidb_fullurl("account.php?cmd=login")); + } + $note = '(Note: accounts for appdb.winehq.org and bugs.winehq.org ' .'are separated, so You might need to create second account for appdb.)'; @@ -156,7 +164,7 @@ function cmd_send_passwd() $user = new User($userid); if ($userid) { - if ($user->update(null, $passwd)) + if ($user->update_password($passwd)) { $sSubject = "Application DB Lost Password"; $sMsg = "We have received a request that you lost your password.\r\n";