fixed missing notification, if user exist, but password wrong

This commit is contained in:
Tim Krehan 2019-05-22 20:56:09 +02:00
parent c6df17af7f
commit 35fd7ca908

View file

@ -33,6 +33,12 @@ if ($result->num_rows == 1)
$insertQuery->execute(); $insertQuery->execute();
} }
else
{
setcookie("token", "false", 0, "/", "");
header("Location: /");
exit(1);
}
$lastLoginDate = date("Y-m-d H:i:s"); $lastLoginDate = date("Y-m-d H:i:s");
$updateQuery = $mysqli->prepare("UPDATE `users` SET `last_login` = ? WHERE `uid` = ?;"); $updateQuery = $mysqli->prepare("UPDATE `users` SET `last_login` = ? WHERE `uid` = ?;");
$updateQuery->bind_param("ss", $lastLoginDate, $userdetails["uid"]); $updateQuery->bind_param("ss", $lastLoginDate, $userdetails["uid"]);