2
This commit is contained in:
parent
3ba44cb90a
commit
98aa2e3c0c
@ -17,8 +17,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$stmt->execute([$username]);
|
||||
$user = $stmt->fetch();
|
||||
|
||||
<?php
|
||||
if (password_verify($password, $user['password'])) {
|
||||
if ($user && password_verify($password, $user['password'])) {
|
||||
$_SESSION['user_id'] = $user['id'];
|
||||
$_SESSION['username'] = $user['username'];
|
||||
header('Location: index.php');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user