2015-12-08 16:18:44 -05:00
|
|
|
Meteor.publish('user-miniprofile', function(userId) {
|
|
|
|
check(userId, String);
|
|
|
|
|
|
|
|
return Users.find(userId, {
|
|
|
|
fields: {
|
|
|
|
'username': 1,
|
|
|
|
'profile.fullname': 1,
|
|
|
|
'profile.avatarUrl': 1,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
2017-02-24 22:10:38 +08:00
|
|
|
|
|
|
|
Meteor.publish('user-admin', function() {
|
|
|
|
return Meteor.users.find(this.userId, {
|
|
|
|
fields: {
|
|
|
|
isAdmin: 1,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
2018-10-03 11:50:52 +03:00
|
|
|
|
2018-10-09 14:14:39 +02:00
|
|
|
Meteor.publish('user-authenticationMethod', function(match) {
|
2018-10-03 11:50:52 +03:00
|
|
|
check(match, String);
|
2018-10-09 14:14:39 +02:00
|
|
|
return Users.find({$or: [{_id: match}, {email: match}, {username: match}]}, {
|
2018-10-03 11:50:52 +03:00
|
|
|
fields: {
|
2018-10-09 14:14:39 +02:00
|
|
|
'authenticationMethod': 1,
|
2018-10-03 11:50:52 +03:00
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|