Bugfix
prüfen, ob $user != false in login.php
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user