available_user.js 244 B

12345678910
  1. Template.available_user.helpers({
  2. getUsername: function (userId) {
  3. const user = Meteor.users.findOne({ _id: userId });
  4. return user.profile.username;
  5. },
  6. isMyUser: function (userId) {
  7. return userId === Meteor.userId();
  8. }
  9. });