Login redirection fix
This commit is contained in:
parent
b92527f7b7
commit
68aebffd6c
3
TODO.md
3
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
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue