Fix warnings when login form is not yet posted

This commit is contained in:
Henjo Hoeksma 2014-05-23 11:57:15 +02:00
parent 4be11b9c80
commit 5c53f7964a

View file

@ -9,7 +9,7 @@ if (isset($_GET['logout']) or isset($_POST['logout'])) {
header("Location: index.php"); header("Location: index.php");
} }
if (!is_logged_in() and $_POST['formname'] == "loginform") { if (!is_logged_in() and isset($_POST['formname']) && $_POST['formname'] == "loginform") {
if (try_login() === TRUE) { if (try_login() === TRUE) {
set_logged_in($_POST['username']); set_logged_in($_POST['username']);
} else { } else {