Api atHome Fix
This commit is contained in:
parent
d08bfa8018
commit
b303a49445
5
api.php
5
api.php
@ -29,14 +29,13 @@ if (isset($obj['user']) && $obj['user'] != ''){
|
|||||||
$user = UserManager::getUser($obj['user']);
|
$user = UserManager::getUser($obj['user']);
|
||||||
if (!empty($user)) {
|
if (!empty($user)) {
|
||||||
$userId = $user['user_id'];
|
$userId = $user['user_id'];
|
||||||
if (is_bool($obj['atHome'])){
|
$atHome = boolval ($obj['atHome']);
|
||||||
UserManager::atHome($userId, $obj['atHome'] ? 'true' : 'false');
|
UserManager::atHome($userId, $atHome ? 'true' : 'false');
|
||||||
echo 'Saved';
|
echo 'Saved';
|
||||||
header("HTTP/1.1 200 OK");
|
header("HTTP/1.1 200 OK");
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//Filtrování IP adress
|
//Filtrování IP adress
|
||||||
if (DEBUGMOD != 1) {
|
if (DEBUGMOD != 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user