Publishing custom Meteor.user() fields

后端 未结 1 1956
猫巷女王i
猫巷女王i 2021-01-02 12:04

I know this question has been asked numerous times but I am having a difficult time publishing this information.

In Accounts.onCreateUser I am adding a field like so

相关标签:
1条回答
  • 2021-01-02 12:20

    You'll want to use null to publish to the single user.

    Meteor.publish(null, function() {
      return Meteor.users.find({_id: this.userId}, {fields: {info: 1}});
    });
    
    0 讨论(0)
提交回复
热议问题