Binato/server/util/getUserByUsername.js

6 lines
183 B
JavaScript
Raw Normal View History

module.exports = function(username) {
for (let i = 0; i < global.users.length; i++) {
if (global.users[i].username == username)
return global.users[i];
}
}