Funktionsfähiges Login / Logout -> dev #76

Merged
sh8937s merged 10 commits from feature/Loginsystem_Loginseite into dev 2024-12-04 21:34:45 +01:00
Showing only changes of commit 7b78b4865f - Show all commits

View File

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