From 7b78b4865f43cc58b1d2207df2b73777f1c412c7 Mon Sep 17 00:00:00 2001 From: Safak Date: Tue, 3 Dec 2024 17:14:43 +0100 Subject: [PATCH] =?UTF-8?q?Bugfix=20pr=C3=BCfen,=20ob=20$user=20!=3D=20fal?= =?UTF-8?q?se=20in=20login.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webseite/login.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webseite/login.php b/webseite/login.php index b1f8cf2..666a787 100644 --- a/webseite/login.php +++ b/webseite/login.php @@ -12,7 +12,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // Try to retrieve the user from the username $user = User::getFromUsername($username); - if ($user->login($password)) { + if ($user && $user->login($password)) { // Redirect to a protected page if login is successful header("Location: index.php?login=success");