Customize the email notification for password change

Users sometimes forget their password, or just feel compelled to change it. To add them, use the Sitefinity CMS functionality that lets users change their password. You can use it to customize the email template that is sent as notification to users who click the Forgot your password? link.

PREREQUISITES:

Enable email notification with link for changing the password

You must enable the password reset functionality of the Sitefinity CMS, so that when a user requests their password, a new password is generated and is sent to them. Then, you link the Login widget to the Change password widget, so that the users can change their password without the need to reset it first. To do this:

  1. In the Sitefinity CMS backend, click Administration » Settings » Advanced.
  2. Click Security » Membership providers » Default » Parameters.
    1. Click enablePasswordReset.
      In the Value field, enter true. Save your changes.
    2. Click requiresQuestionAndAnswer.
      In the Value field, enter false. Save your changes.
    3. Recycle your application pool for the changes to take effect.
  3. Go to Pages and create a page.
  4. Drag and drop the Login widget and save your changes.
  5. Click the Edit button of the Login widget and perform the following:
    1. In the ChangePasswordPageUrl input field, enter the URL of the page where the Change password widget is located.
    2. In ShowLostPaswordLink, enter true
    3. Click Save.
  6. Publish the page.

As a result, when a user attempts login to your website, the Forgot your password? link appears. After clicking the link, the user enters the email address they used when registering. The system sends an email containing a link to the page where the Change password widget is located. 

Customize the email template body

You can further customize the email template by changing the text in the email body.

By default, the body of the email has the following HTML content:

To change the email body:

  1. Navigate to Administration » Labels and Messages
  2. Click the LostPasswordEmailBody label and edit it.
  3. Save your changes.
EXAMPLE: Following is an example of customized mail body:

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?