Update Script.php

this change is on line 160. it allows both new users and old users to loginto the system successfully by verifying hashed passwords and normal passwords
ProjectHomePage
CloudStarTreck 2020-03-16 15:35:12 +08:00
parent 625d447dd9
commit c77b470e8a
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ header("Location: index.php");
else else
{ {
while($row = mysqli_fetch_assoc($result)) { while($row = mysqli_fetch_assoc($result)) {
// verify the hashed password and unhashed password // verify the hashed password and unhashed password
if(password_verify($password, $row["Password"]) or ($password = $row["Password"])){ if(password_verify($password, $row["Password"]) or ($password = $row["Password"])){
$_SESSION['user_id']=$row['User_ID']; $_SESSION['user_id']=$row['User_ID'];
$_SESSION['user_email']=$row['Email']; $_SESSION['user_email']=$row['Email'];