You can use a accountsServer.onCreateUser(func)hook that will be called whenever a new user is created:
if (Meteor.isServer) {
Accounts.onCreateUser(function(options, user) {
console.log(user);
return user;
});
}
The returned userwill be inserted into the collection Meteor.users.
Here is the MeteorPad .
source
share