2

When a user attempts to reset their password, they're emailed a link -- if they click on this link late, or click on it twice, they're shown the "Oops! Invalid verification code. Please login or reset your password."

Any chance this can be sent to a custom template, ala the loginPath or setPasswordPath configs?

1

There's not a native way I can see to do this.

Neither of these are clean workarounds, but assuming you're referring to Craft 3, you could either write a plugin that extended Craft's ErrorHandler class and overwrote the handleException class, inspected for that particular error messae and swapped it with one of your own. You'd need to tell Craft to use your ErrorHandler in craft/config/app.php.

Alternatively, you write a plugin that mimics Craft's UsersController's setPassword method doing your own custom logic and have the user related emails point to your plugin's controller instead of the native Craft one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.