On a shell within the project directory run: meteor mongo
Then db.users.findOne()
You will then see what’s actually in the database, without having to guess.
So to get the email of a single user you do the following:
var user = Meteor.users.findOne({}); // or specify the _id of the user
var email = user.emails[0].address;
Notice how the emails attribute is an array and normally if your users create accounts using an email it will be placed in emails[0], the first entry, which in itself is an object so to get the actual email address you look for the address property.
Additional hint: are you sure data is ready (i.e. downloaded from the server) when you call Meteor.user()? At startup time, you might need to wait a bit before accessing the data.
the emails have been persisted in local mongo, I’ve managed to make it working by publish and subscribe it in at the client. Just the doc is pretty confusing.
You need the accounts-password package to get the structure I gave above. Once you’ve done that and if you don’t feel comfortable with the structure of the document; perhaps you might use something like dburles:collection-helpers package to do something like this:
Or maybe it is simple as with Facebook login - there is no email cause you dont need 1 to authenticate.
And if you want email, get it from Facebook API.