The Meteor API now has the hook onCreateUser
:
Accounts.onCreateUser(function (options, user) {
Todos.insert({
owner: user._id,
text: "First todo to cross off!",
});
// We still want the default hook's 'profile' behavior.
if (options.profile)
user.profile = options.profile;
return user;
});
More Related Contents:
- I’m trying to build a music and video player, is there good support available in meteor js? Pls. suggest / recommend
- How do I use an existing MongoDB in a Meteor project?
- How to serve a file using iron router or meteor itself?
- Publish documents in a collection to a meteor client depending on the existence of a specific document in another collection (publish-with-relations)
- Publish certain information for Meteor.users and more information for Meteor.user
- Meteor’s subscription and sync are slow
- What are the best practices for structuring a large Meteor app with many HTML template files? [closed]
- How can I deploy node modules in a Meteor app on meteor.com?
- Understanding “Not permitted. Untrusted code may only update documents by ID.” Meteor error
- How to get the user IP address in Meteor server?
- How to ‘transform’ data returned via a Meteor.publish?
- Apollo / GraphQl – Type must be Input type
- Uncaught TypeError: fs.readFileSync is not a function
- Callback after the DOM was updated in Meteor.js
- How to build a Meteor smart package
- Meteor.methods returns undefined
- Meteor: how to search for only distinct field values aka a collection.distinct(“fieldname”) similar to Mongo’s
- Ordering of the css and js files loaded by Meteor
- How can I completely uninstall and then reinstall Meteor.js?
- Meteor: Calling an asynchronous function inside a Meteor.method and returning the result
- How can I access constants in the lib/constants.js file in Meteor?
- How can I get the index of an array in a Meteor template each loop?
- Generating a PDF file from React Components
- Dynamically loading templates in Meteor.js
- When should you use render and shallow in Enzyme / React tests?
- Meteor Subscribe doesn’t update sort order of collection
- Best Model for Representing Many to Many relationships with attributes in MongoDB
- Meteor Node Process CPU Usage Nears 100%
- How to increment a field in mongodb?
- How can Meteor apps work offline?