From acb7df6d924800a4ba85ac31708a3f61fabe7e64 Mon Sep 17 00:00:00 2001 From: xiaomlove <1939737565@qq.com> Date: Thu, 30 Oct 2025 11:29:00 +0700 Subject: [PATCH] reset try catch --- public/reset.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/reset.php b/public/reset.php index a37d6771..4b1c06a0 100644 --- a/public/reset.php +++ b/public/reset.php @@ -39,7 +39,11 @@ $id = $arr['id']; //$wantpasshash = md5($secret . $wantpassword . $secret); //sql_query("UPDATE users SET passhash=".sqlesc($wantpasshash).", secret= ".sqlesc($secret)." where id=$id"); $userRep = new \App\Repositories\UserRepository(); - $userRep->resetPassword($id, $newpassword, $newpasswordagain); + try { + $userRep->resetPassword($id, $newpassword, $newpasswordagain); + } catch (\Exception $e) { + stderr('Error', $e->getMessage()); + } write_log("Password Reset For $username by {$CURUSER['username']}"); if (mysql_affected_rows() != 1) stderr("Error", "Unable to RESET PASSWORD on this account.");