mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Adtional tweeks and fixes
This commit is contained in:
1 parent
94d6576070
commit
e3b7e866f0
6 files changed
+43
-28
No files matched your search
@@ -16,4 +16,22 @@ class UsersApi extends ApiController{
|
||||
|
||||
$this->response($response);
|
||||
}
|
||||
|
||||
public function status(){
|
||||
//$this->requireAuth();
|
||||
$response = null;
|
||||
$obj = $this->input;
|
||||
$atHome = $obj['atHome'];
|
||||
|
||||
$user = UserManager::getUser($obj['user']);
|
||||
$userAtHome = $user['at_home'];
|
||||
$userId = $user['user_id'];
|
||||
|
||||
if (!empty($user)) {
|
||||
if($userAtHome != $atHome){
|
||||
UserManager::atHome($userId, $atHome);
|
||||
}
|
||||
}
|
||||
$this->response(['value'=>'OK']);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user