You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
537 B
PHP

<?
include_once("../php/include-request.php");
$action = getMandatoryRequestValue("action");
if($action == "logout") {
logout();
requestOk("Logged out");
} else if($action == "login") {
$householdId = getMandatoryRequestValue("householdId");
$password = getMandatoryRequestValue("password", "Password cannot be empty");
$ok = login($householdId, $password);
if($ok) {
requestOk("Logged in");
} else {
requestAuthFail("Invalid password");
}
} else {
requestFail("Unknown request action \"$action\"");
}
?>