This commit is contained in:
Flatlogic Bot 2025-10-20 23:32:41 +00:00
parent 3ba44cb90a
commit 98aa2e3c0c

View File

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