mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 12:50:40 +02:00
Don't display users who aren't in a domain
This commit is contained in:
parent
763028dad4
commit
afc85a3afe
1 changed files with 7 additions and 2 deletions
|
@ -71,8 +71,13 @@
|
|||
function displayUsers(data) {
|
||||
$("#users-list").empty();
|
||||
for (var i = 0; i < data.users.length; i++) {
|
||||
console.log(data.users[i].username + " @ " + data.users[i].location.root.name);
|
||||
$("#users-list").append("<div>" + data.users[i].username + " @ " + data.users[i].location.root.name + "</div>");
|
||||
// Don't display users who aren't in a domain
|
||||
if (typeof data.users[i].location.root.name === "undefined") {
|
||||
console.log(data.users[i].username + "is online but not in a domain");
|
||||
} else {
|
||||
console.log(data.users[i].username + " @ " + data.users[i].location.root.name);
|
||||
$("#users-list").append("<div>" + data.users[i].username + " @ " + data.users[i].location.root.name + "</div>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue