I creating custom accounts package and i need to set userId of DDP connection after login successful.
I using this method to do that:
Meteor.connection.setUserId(userId);
But i can’t use it in publishcation methods:
Meteor.publish('jobs', function(options){
console.log(this.userId); // <= NULL
});
Anyone can help me?