nicolaslopezj / meteor-apollo-accounts

Meteor accounts in GraphQL
MIT License
146 stars 37 forks source link

Has anyone used Accounts.onCreateUser with meteor-apollo-accounts? #84

Closed acomito closed 6 years ago

acomito commented 6 years ago

What would you return from this? Just returning the user is leaving out the options...

Accounts.onCreateUser(function (options, user) {
  Meteor.call('sendWelcomeEmail');
  return user
});

EDIT:

simple solution:

Accounts.onCreateUser(function (options, user) {
  Meteor.call('sendWelcomeEmail', user, options);
  return Object.assign({}, user, options);
});