After reading this insightful comment by David Glasser on GitHub:
this.userId
is considered the primary API, whileMeteor.userId()
is just a convenient shortcut for those who are new to JavaScript and may not fully grasp how to effectively utilizethis.userId
yet.
It appears that it would be best practice to use this.userId
whenever possible, especially within method functions where both options are available, reserving Meteor.userId()
strictly for publish functions. If this is indeed the recommended approach, then why?
(Any insights provided through references to specific sections of code would be greatly appreciated as well; I am having trouble locating them)