I’m have a subscription for all users and a specific field, I now want to return all users except the current logged in users. But using the $in
and $ne
mongoDB operators but this still returns the current user to. This is my code:
Template.Home.helpers({
other: function(){
var userID = Meteor.user()._id;
console.log('ID: ' + userID);
var user = Meteor.users.find({_id:{$ne:{userID}}}).fetch();
console.log(user);
}
});
How can I just return the other users only?