2015-12-08 16:18:44 -05:00
|
|
|
Meteor.publish('user-miniprofile', function(userId) {
|
|
|
|
|
check(userId, String);
|
|
|
|
|
|
|
|
|
|
return Users.find(userId, {
|
|
|
|
|
fields: {
|
2019-06-28 12:52:09 -05:00
|
|
|
username: 1,
|
2015-12-08 16:18:44 -05:00
|
|
|
'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);
|
2019-06-28 12:52:09 -05:00
|
|
|
return Users.find(
|
|
|
|
|
{ $or: [{ _id: match }, { email: match }, { username: match }] },
|
|
|
|
|
{
|
|
|
|
|
fields: {
|
|
|
|
|
authenticationMethod: 1,
|
|
|
|
|
},
|
2018-10-03 11:50:52 +03:00
|
|
|
},
|
2019-06-28 12:52:09 -05:00
|
|
|
);
|
2018-10-03 11:50:52 +03:00
|
|
|
});
|