Funktionsfähiges Login / Logout -> dev #76
@@ -12,7 +12,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
|||||||
// Try to retrieve the user from the username
|
// Try to retrieve the user from the username
|
||||||
$user = User::getFromUsername($username);
|
$user = User::getFromUsername($username);
|
||||||
|
|
||||||
if ($user->login($password)) {
|
if ($user && $user->login($password)) {
|
||||||
// Redirect to a protected page if login is successful
|
// Redirect to a protected page if login is successful
|
||||||
header("Location: index.php?login=success");
|
header("Location: index.php?login=success");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user