From 68aebffd6c6658d26d20c8a415c293927dded9f3 Mon Sep 17 00:00:00 2001 From: posweg Date: Thu, 21 May 2020 21:55:28 +0000 Subject: [PATCH] Login redirection fix --- TODO.md | 3 ++- login.php | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 0a0ed84..ea24bb7 100644 --- a/TODO.md +++ b/TODO.md @@ -18,5 +18,6 @@ - Relative time - Bugs: - - Login redirection is broken + - ~~Login redirection is broken~~ - Check that the user exists before keeping being logged like it + - Registration should ask for password two times diff --git a/login.php b/login.php index 5d7bb68..a294b51 100644 --- a/login.php +++ b/login.php @@ -10,7 +10,6 @@ if(isset($_POST["log"])){ $user = $_POST["logname"]; $shadow = $db->querySingle("SELECT shadow FROM users WHERE username = '$user'"); if(password_verify($_POST["password"],$shadow)){ - echo("Logged in"); $_SESSION["login"] = true; $_SESSION["uid"] = $db->querySingle("SELECT id FROM users WHERE username = '$user'"); header("Location: /"); die();