Skip to content

Instantly share code, notes, and snippets.

@sergical
Created February 5, 2015 17:42
Show Gist options
  • Save sergical/19b4c01c86298d48ed33 to your computer and use it in GitHub Desktop.
Save sergical/19b4c01c86298d48ed33 to your computer and use it in GitHub Desktop.
onboarding
Accounts.onCreateUser(function(options, user) {
//misc stuff
if(options.profile.invite){
Invites.remove({_id: options.profile.invite});
}
//this is what i need to be doing?
user.isNew = true;
return user;
});
@sergical
Copy link
Author

sergical commented Feb 5, 2015

This works

Accounts.onCreateUser(function(options, user) {

  if(options.profile.invite){
    Invites.remove({_id: options.profile.invite});
  }

  user.profile = options.profile
  user.profile.isNew = true;

  return user;
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment