I want to modify the user controller

I want to add a condition to register api , so when every user register he will insert a predefined invitation code. that code will search in invitations collections by email ID if exist then user will register , otherwise registration will fail.
How Can I add this (override ) user controller?
Thank you

1 Like