I am currently publishing the user related details using the following code:
Meteor.publish('userData', function () {
return Meteor.users.find({_id: this.userId}, {fields: {profile: 1, emails: 1}});
});
and subscribing using Meteor.subscribe(‘userData’);
After login to the app, and print Meteor.user() in chrome console, it prints all the details related to the user object - for example it publishes emails.0.verified. I dont want to publish the verification details.
I have tried the following which din’t work
Meteor.publish('userData', function () {
return Meteor.users.find({_id: this.userId}, {fields: {profile: 1, emails.0.address: 1}});
});
I dont want to publish the verification details. Is this possible?