Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postSignUpHook Feature #536

Closed
shwaydogg opened this issue Sep 16, 2015 · 6 comments
Closed

postSignUpHook Feature #536

shwaydogg opened this issue Sep 16, 2015 · 6 comments

Comments

@shwaydogg
Copy link
Contributor

I propose adding a postSignUpHook that would run server side only or a postSignUpHookServer and postSignUpHookClient.

This would address issues that came up in these SO questions:

http://stackoverflow.com/questions/30482814/meteor-how-to-assign-different-roles-to-users-during-sign-up-process/32468020#32468020
http://stackoverflow.com/questions/12984637/is-there-a-post-createuser-hook-in-meteor-when-using-accounts-ui-package/13483188#comment52798127_13483188

^see my comments as shwaydogg

I'll write and make a pull request, but following instructions to bat around here first.

Cheers!

@splendido
Copy link
Member

What about calling it onCreateUser? Do you think this could make things clearer (recalling the aim for Accounts.onCreateUser or could it be confusing?

In any case, I agree it makes sense to have another hook just after user creation.
The place where tu put it should be around here

@shwaydogg
Copy link
Contributor Author

Yep, I think it would be misleading. 90% of the motivation for this addition is because Meteor's Accounts.onCreateUser is aptly named on not post because the new use has NOT been added to the user collection yet. This is what caused the issues in the SO questions.

I'd also say best to stay with the linguistics of the current hook names such as preSignUpHook: clear and precise!

Sound good?

Also, @splendido, thanks for the headsup on the where it should go in the code! I'd found the same spot before asking, had to make sure it wasn't going to be a crazy edit before saying I'd do it ;)

@splendido
Copy link
Member

👍

@nalexeric
Copy link

@shwaydogg any news on this?

@shwaydogg
Copy link
Contributor Author

@nalexeric & @splendido, I made pull request #586

splendido added a commit that referenced this issue Dec 5, 2015
Added postSignUpHook as discussed in #536
@splendido
Copy link
Member

merged, tnx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants