Meteor-Community-Packages / meteor-collection-hooks

Meteor Collection Hooks
https://atmospherejs.com/matb33/collection-hooks
MIT License
657 stars 92 forks source link

Meteor.users.after.insert isn't called on account creation #135

Closed elie222 closed 8 years ago

elie222 commented 9 years ago

I realise that there's the Accounts.onCreateUser method, but this can only be called once, and is called before the user is created anyway.

I'm probably missing something. Here's my code:

Meteor.users.after.insert(function (userId, doc) {
  console.log('after insert user');
});

The log isn't printed to the console.

heaven7 commented 9 years ago

Is this code on the client or on the server?

chenrozenes commented 9 years ago

I have the same problem. On the server

matb33 commented 9 years ago

What other packages are you using? It's likely some kind of package interference.

alanning commented 8 years ago

I just tested with a minimal app and confirmed that Meteor.users.after.insert is successfully called after Accounts.createUser.

I recommend closing this issue and re-opening if someone posts a repro.

matb33 commented 8 years ago

Agreed, thanks @alanning for popping in and helping out -- much appreciated