I have the following piece of code in my server/fixtures.js
file:
var userId = Accounts.createUser({
username: "tester",
email: "a@b.com",
password: "foobar",
profile: { name: "Max" }
});
var user = Meteor.users.findOne({_id: userId});
console.log(user.profile.name);
Now when I run meteor
it logs undefined
. What am I doing wrong?
I'm pretty sure I've had an Accounts.onCreateUser callback defined somewhere that was responsible for this. My bad!