Validation hooks for ForgotPassword

Hey all,

I was wondering how I can do a custom validation check with the ForgotPassword snippet. I wrote a script that imports and creates thousands of user accounts into the CMS. Some of the accounts do not have an email address so I set a temp email address to be saved in the email field as {account_number}

What I’m trying to achieve is that when the user tries to log into their portal and try to reset their password, I would run a validation check to see if their email was set to “” and if true, make a request to the user to submit their email address. This email address will be sent to the client’s customer service team to verify the customer’s email request update and they will set the new email address via the backend and email the customer their password.

Is it possible to add custom hooks to the ForgotPassword snippet? Or will I have to write a custom snippet to achieve this?

This series of articles might be useful to you.

The ForgotPassword snippets runs prehooks (property preHooks) before the E-Mail is sent. So maybe you can use a prehook snippet to check the user and do a redirect, if the email-address matches