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