Prerequisites

  • You have installed the Secure Zone Module.
  • You have created at least one Secure Zone and Signup/Login Forms for it, follow this document for more information on how this is done.

Introduction

In this article, I'll explain how you can setup a front-end password reset flow. This feature allows Users to change their password in case they've forgotten/lost it.

To reset the password, an email is sent to the user's email address, which contains a link allowing the User to recover their password.

Syntax

When you install the Secure Zone Module, two system pages "Reset Password" and "Recover Password" needed for resetting a password will be added to the Site. These can be found and customized under Site Manager > System Pages.

For a User to be able to reset their password, they must first visit the "Reset Password" system page. After entering their email and submitting the password reset form they'll receive a link to the "Recover Password" Page.

Note: If a User visits this Page without clicking the link in their email, they won't be allowed to reset their password as no token is given.

Linking to the Recover Password Page

Use the following link to direct a User to the Recover Password Page:

<a href="/system/recover-password" title="Reset password">Reset Password</a>

We recommend adding this link at the bottom of a Login Form, as this is where the User is most likely to encounter issues with their Password. However, you can use this link anywhere on a Site.

The link will redirect to the Recover Password Page, from here a User will enter their email and submit the Form.

Customize the Recover Password Email

To customize the recover password email a User receives, go to Site Manager > System Emails > Secure Zones - Password Reset. Here you'll be able to edit the email as you wish, though you'll want to ensure the Password Reset link is included:

<a href="{{context.exports.reset_password.data.reset_password_url}}">Reset password!</a></p>

Related Articles

Did this answer your question?