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

Hook for validating user registrations #2356

Closed
jxns opened this issue Sep 25, 2020 · 2 comments
Closed

Hook for validating user registrations #2356

jxns opened this issue Sep 25, 2020 · 2 comments

Comments

@jxns
Copy link

jxns commented Sep 25, 2020

Hello!
Is it possible to extend the hooks for users?

I added a field to the member DCA which I also query in the registration. I want to confirm the field and make it dependent on whether a registration is allowed or not. Like a query for a license key.

The only hook I found which would be nearly matching was the createNewUser-Hook but this hook is fired after the registration is already done.

Can we add a new hook like verifyNewUser which is executed after the registration form was send but before the new user is created and which also requires a return value so that the registration can be rejected, if necessary?

@fritzmg
Copy link
Contributor

fritzmg commented Sep 25, 2020

Just use a save_callback on your field in order to validate it.

@jxns
Copy link
Author

jxns commented Oct 1, 2020

Thank you, that was exactly what I was looking for!

@jxns jxns closed this as completed Oct 1, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants