Monday, 15 March 2010

Meteor.userId vs Meteor.userId() -



Meteor.userId vs Meteor.userId() -

i have short piece of code, so, update name in user's profile:

meteor.users.update({_id: meteor.userid()}, {$set:{"profile.name": name}});

when i'm working locally, can utilize meteor.userid or meteor.userid() without issue. however, when deploy modulus, run issues. if don't have operator on it, initial $set, no more. if user operators, behaves expect.

why this? assume shouldn't have been using without operator begin with, there reason why worked @ all?

have in documentation

the function `meteor.userid() available "anywhere publish functions"

the variable this.userid available "anywhere" (which explicitly called out server side publish function).

meteor userid

No comments:

Post a Comment