Script.php: we create for backward compatibility. -Hui
parent
1aec051398
commit
cdd4dceb0a
|
@ -158,7 +158,7 @@ header("Location: index.php");
|
||||||
{
|
{
|
||||||
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
|
||||||
$sha512pass = hash('sha512', $password);
|
$sha512pass = hash('sha512', $password); // for backward compatibility. Old passwords were hashed using SHA512 algorithm.
|
||||||
if(password_verify($password, $row["Password"]) or $sha512pass == $row["HashPassword"] or $password == $row["Password"]){
|
if(password_verify($password, $row["Password"]) or $sha512pass == $row["HashPassword"] 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'];
|
||||||
|
|
Loading…
Reference in New Issue