2020-06-23 18:23:11 +00:00
|
|
|
<?php
|
|
|
|
class UsersApi extends ApiController{
|
|
|
|
public function default(){
|
|
|
|
//$this->requireAuth();
|
|
|
|
$response = null;
|
|
|
|
|
|
|
|
$users = UserManager::getUsers(["user_id", "username", "at_home"]);
|
|
|
|
|
|
|
|
foreach ($users as $key => $user) {
|
|
|
|
$response[] = [
|
|
|
|
"userName" => $user['username'],
|
2020-07-01 10:07:00 +00:00
|
|
|
"homeStatus" => ($user['at_home'] == 'true') ? true : false,
|
2020-06-23 18:23:11 +00:00
|
|
|
"avatarUrl" => UserManager::getAvatarUrl($user['user_id']),
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->response($response);
|
|
|
|
}
|
|
|
|
}
|