users.js 355 B

12345678910111213141516171819
  1. Meteor.publish('user-miniprofile', function(userId) {
  2. check(userId, String);
  3. return Users.find(userId, {
  4. fields: {
  5. 'username': 1,
  6. 'profile.fullname': 1,
  7. 'profile.avatarUrl': 1,
  8. },
  9. });
  10. });
  11. Meteor.publish('user-admin', function() {
  12. return Meteor.users.find(this.userId, {
  13. fields: {
  14. isAdmin: 1,
  15. },
  16. });
  17. });