mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
reset try catch
This commit is contained in:
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user