How to let users change their password

From Lifeguide Wiki
Jump to: navigation, search

You can create pages which allow end-users to reset their password (if they have forgotten it) and/or change their password.

To allow users to reset their password, you will need 5 new pages:

1) A page with a free-entry text box where end-users enter the email address they registered with. An email will be sent to them with a new password, which consists of a randomly generated series of numbers, and upper and lower case letters. We recommend that end-users change this password the next time they login to a password that they can easily remember. This page will need a Next button.

2) A page that confirms their password has been changed and asks them to check their email and login again with their new password. You can insert a button on this page which jumps to the login page.

3) A page which allows them to change their password. This page will need one free-entry text box for their current password and another one for their new password. This page will need a Next button.

4) A page which is shown when their password could not be changed because they entered their current password incorrectly. You can insert 2 links on this page - one which takes them to the page where they can change their password and one which takes them back to the login confirmation page.

5) A page which is shown when their password has been successfully changed. You can insert a button on this page which jumps to the login page.

In the logic file, you will use the logic commands resetpassword and changepassword . An example is shown below:

show resetpass after resetpass if (resetpassword(resetpass.email)) goto resetpass_confirm show resetpass_confirm

show changepass after changepass if (changepassword(username, changepass.old, changepass.new)) goto changepass_confirm show changepassfailed show changepass_confirm


The Changing and resetting end-user passwords tutorial contains this logic and will show you what text to include on these pages.