From 35fd7ca9087c406c66923da3206ba7095690bfd2 Mon Sep 17 00:00:00 2001 From: Tim Krehan Date: Wed, 22 May 2019 20:56:09 +0200 Subject: [PATCH] fixed missing notification, if user exist, but password wrong --- php/login.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/php/login.php b/php/login.php index cbe7dc1..494a76f 100644 --- a/php/login.php +++ b/php/login.php @@ -33,6 +33,12 @@ if ($result->num_rows == 1) $insertQuery->execute(); } + else + { + setcookie("token", "false", 0, "/", ""); + header("Location: /"); + exit(1); + } $lastLoginDate = date("Y-m-d H:i:s"); $updateQuery = $mysqli->prepare("UPDATE `users` SET `last_login` = ? WHERE `uid` = ?;"); $updateQuery->bind_param("ss", $lastLoginDate, $userdetails["uid"]);