From dbd1d42e819534dad26b296e4da17b53c065382d Mon Sep 17 00:00:00 2001 From: ketertitus Date: Tue, 26 Mar 2024 03:56:34 +0300 Subject: [PATCH] hash on reset --- reset.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reset.php b/reset.php index ef245dc..913ef28 100644 --- a/reset.php +++ b/reset.php @@ -213,7 +213,8 @@ function sendPasswordResetEmail($email, $resetToken) // Prepare and bind the statement $stmt = $conn->prepare($sql); - $stmt->bind_param("ss", $password, $rUID); + $hashedPassword = password_hash($password, PASSWORD_DEFAULT); + $stmt->bind_param("ss", $hashedPassword, $rUID); // Prepare the SQL statement with a parameter placeholder $sql1 = "SELECT `email`, `user_name` FROM user WHERE user_id = ?";