How do you get the _id of the user who is logged in. I tried the following combinations and I get errors, or undefined
When creating a user, the user automatically subscribes to the application. Is user returned an Accounts.onCreateUser function that occurs after a user logs in?
Accounts.onLogin(function(){ var user = this.userId / Meteor.user() / Meteor.user()._id console.log(user) })
http://docs.meteor.com/#/full/accounts_onlogin
source share