Binato/server/util/getUserByToken.js

10 lines
242 B
JavaScript
Raw Normal View History

module.exports = function(token) {
let user = null;
for (let i = 0; i < global.users.length; i++) {
if (global.users[i].uuid == token) {
user = global.users[i];
break;
}
}
return user;
}