Binato/server/util/getUserByUsername.js

6 lines
No EOL
145 B
JavaScript

module.exports = function(username) {
for (let user of global.users.getIterableItems()) {
if (user.username == username)
return user;
}
}