Login redirection fix

This commit is contained in:
posweg 2020-05-21 21:55:28 +00:00
parent b92527f7b7
commit 68aebffd6c
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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();