Reputation:
After successfully adding the "account-ui" & "accounts-password" packages using the METEOR platform, I encountered difficulties in attempting to implement the todo app.
How do I add user data?
More specifically:
Upvotes: 0
Views: 49
Reputation: 6564
Generally, I would try to avoid updating the 'users' collection frequently, so I'd store that information in a separate collection. But since this is not what you asked, here's how you store a default value in a user document.
Accounts.onCreateUser(function (options, user) {
user.profile = {points: 0};
return user;
});
http://docs.meteor.com/#/full/accounts_oncreateuser
Upvotes: 1