userId can be accessed from everywhere using
from publish functions, where you have to use
from methods called from publish functions, where you have to use
this.userId(well, I am not sure about this one, but the fact is there is a
this.userIdin methods, see here).
What is the cleanest way you have found to manage this? Did you find a unified way to declare a function which uses
userId and will be used in methods and publish functions, on client and server?