Binato/server/util/getUserByToken.js
2020-09-07 17:35:37 +01:00

10 lines
No EOL
242 B
JavaScript

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;
}