@@ -10,3 +10,16 @@
Meteor.publish('posts', function() {
return Posts.find();
});
+
+Meteor.publish('userData', function () {
+ // If user is logged-in.
+ if (this.userId) {
+ return Meteor.users.find({
+ _id: this.userId
+ }, {
+ fields: {
+ 'emails': 1
+ }
+ })
+});