Disable PW reset option for blocked users

Hi all,

I have an app for which I would like to prevent a blocked (bruteforce) user from resetting his password trough the link in the login window.

Yet, I want the non-blocked users to have this possibility.

Is this somehow possible trough a custom action or a template change? I tried changing the “reset password” email template, but was not able to detect if the user is blocked or not, inside of the email template using liquid operators.