Again
This commit is contained in:
parent
da975598c5
commit
41916a90bd
19
app/api/UsersApi.php
Normal file
19
app/api/UsersApi.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?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'],
|
||||||
|
"homeStatus" => ($user['at_home']) ? true : false,
|
||||||
|
"avatarUrl" => UserManager::getAvatarUrl($user['user_id']),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->response($response);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user