Binato/server/util/getUserById.js

10 lines
234 B
JavaScript
Raw Normal View History

2020-08-27 13:09:35 +01:00
module.exports = function(id) {
let user = null;
for (let i = 0; i < global.users.length; i++) {
if (global.users[i].id == id) {
user = global.users[i];
break;
}
}
return user;
}