<p>There's not a native way I can see to do this.</p>

<p>Neither of these are clean workarounds, but assuming you're referring to Craft 3, you could either write a plugin that extended Craft's <a href="https://github.com/craftcms/cms/blob/develop/src/web/ErrorHandler.php" rel="nofollow noreferrer">ErrorHandler</a> class and overwrote the <code>handleException</code> 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 <code>craft/config/app.php</code>.</p>

<p>Alternatively, you write a plugin that mimics Craft's <a href="https://github.com/craftcms/cms/blob/develop/src/controllers/UsersController.php" rel="nofollow noreferrer">UsersController</a>'s <code>setPassword</code> method doing your own custom logic and have the user related emails point to your plugin's controller instead of the native Craft one.</p>

CC BY-SA 4.0
2018-07-30T21:40:12.887Z
2018-07-30T21:40:12.887Z
Brad Bell
<p>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."</p>

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

<login><password>
Invalid Verification Code Customization?
# Invalid Verification Code Customization?

(Asked by: username_0 on 2018-07-30)

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?

**Tags:** login, password


---

## 1 answers

### Answer by username_1 on 2018-07-30. Score: 1 | Accepted answer

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](https://github.com/craftcms/cms/blob/develop/src/web/ErrorHandler.php) 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](https://github.com/craftcms/cms/blob/develop/src/controllers/UsersController.php)'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.


---

