> For the complete documentation index, see [llms.txt](https://docs.toomuchmedia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.toomuchmedia.com/nats-admin/members/common-questions/how-to-allow-members-to-retrieve-or-reset-their-password.md).

# How to allow Members to retrieve or reset their Password

*Article Topics:* [*Members*](/getting-started/common-topics/members.md)

NATS has several ways of retrieving Member passwords in case they have been forgotten or lost.&#x20;

The password retrieval script you will be using will ask for their email address, as well as a NATS member I.D. number. It will then retrieve the user's email from the NATS database and email them their lost password.

If a member forgot their password, you can either enable the password retrieval from a form template or post directly to the forgotten password script.&#x20;

## Secure Password Reset via Email Link

{% hint style="warning" %}
**NATS Version Note:** This feature is only available in NATS 5.1.2.25 and above.
{% endhint %}

To improve security, NATS can be configured to send members a secure, time-sensitive password reset link instead of emailing their current password in plaintext.

### How the Reset Flow Works

1. **Request**: The member submits their username and email on the standard password retrieval page (<https://linkdomain/signup/password.php?siteid=\\><siteid>).
2. **Email**: NATS sends an email containing a unique, time-sensitive verification link.
3. **Reset**: The member clicks the link, which directs them to a page to create a new password.
4. **Completion**: Upon successful reset, the member can log in with their new password.

### Configuration

To enable this feature:

1. Navigate to the **Configuration Admin**.
2. Navigate to the **Surfer** section.
3. Locate the **Member Forgot Password No Plaintext** setting and change it to **YES**.

### Required Template Updates

For this feature to function properly, your site templates must be updated to support the reset link flow.

* **mail\_member\_password** / **mail\_member\_password\_html**:
  * This email template is sent to the member after they request a reset.
  * These templates have been updated to include a reset link. If you do not have these updated default templates, please submit a support ticket
* **member\_reset\_password**:
  * This is the new page where the member enters their new password.
  * It contains fields for `new_password` and `verify_password`.

### Automated Usage (API / External Scripts)

If you are using an external automated script to trigger the separate reset email, you can send an HTTP GET to:

{% code overflow="wrap" %}

```
https://linkdomain/signup/password.php?siteid=~siteid~&username=~username~&email=~email~&submit=1
```

{% endcode %}

If **Member Forgot Password No Plaintext** is enabled, this request will trigger the reset link email instead of returning the password.

## Retrieving Passwords through the Built-in Template

If you do not want to use automated password retrieval scripts,&#x20;

If Members have forgotten or lost their password, you can have them submit their information to the password retrieval [template ](/nats-admin/sites/site-templates.md)in NATS. NATS will then check the information in their submission and send the member a lost password email if the credentials are correct.&#x20;

To direct your members to this form, send them the following URL:

"<http://linkdomain/signup/password.php?siteid=\\~siteid\\>\~"

Where you can replace the linkdomain with your actual NATS linkdomain and the siteid with your siteid.

### Three Templates Associated with Member Passwords

There are three Tour Templates that are associated with the retrieval of passwords for members, each of which does different things:

* **member\_password -** Prompts Members to enter their username and password
* **member\_password\_sent -** Displays a reminder that an email was sent to retrieve their password
* **mail\_member\_password -** The Body of the email that is sent

## Retrieving Passwords through Automated Password Retrieval

### Retrieving Passwords by Username and Email

If you would like to retrieve the member's password by using their username and email address, you can send an **HTTP GET** to the following URL:

{% code overflow="wrap" %}

```
https://linkdomain/signup/password.php?siteid=~siteid~&username=~username~&email=~email_address~&submit=1
```

{% endcode %}

Make the following replacements in the above URL to set the variables:

* Replace ***linkdomain*** with your linkdomain
* Replace *\~**siteid**\~* with your site's I.D. number.
* Replace *\~**username**\~* with the member's username.
* Replace *\~**email\_address**\~* with the member's email address.

**Optional:** Instead of siteid=\~siteid\~, you can use siteids=\~siteids\~:

* If you use this, replace *\~**siteids**\~* with a comma-separated list of siteids you wish to search. NATS will use the first siteid found on this list in order to determine which member it sends the reminder email to.&#x20;

### Retrieving Passwords by Member I.D.

An alternative to retrieving passwords by username and email is through their Member I.D.&#x20;

You would need to send an HTTP GET to the following URL:

{% code overflow="wrap" %}

```
https://linkdomain/signup/password.php?siteid=~siteid~&memberid=~memberid~&submit=1
```

{% endcode %}

Make the following replacements in the above URL to set the variables:

* Replace ***linkdomain*** with your linkdomain
* Replace *\~**siteid**\~* with your site's I.D. number
* Replace *\~**memberid**\~* with the member's I.D. number

Retrieving Password and Username by Email

In the rare case where a Member has forgotten both their username and password, their information can be retrieved using only their email address.

If you want to retrieve the member's username and password by using their email, you will need to turn off the configuration "**Retrieval Require Username"**.&#x20;

This setting can be found in the **Surfer** section of the **Configuration Admin** under the Member Password Retrieval Settings header.

<figure><img src="/files/rCrs1PWZQl9fZmjRGJUB" alt=""><figcaption></figcaption></figure>

Once this is turned off, you can send an HTTP GET to the following URL:

{% code overflow="wrap" %}

```
https://linkdomain/signup/password.php?siteid=~siteid~&email=~email_address~&submit=1
```

{% endcode %}

Make the following replacements in the above&#x20;

* Replace ***linkdomain*** with your linkdomain
* Replace *\~**siteid**\~* with your site's I.D. number
* Replace *\~**email\_address**\~* with the member's email address

### Updating Member Password

If you would like to allow the member to update their password to a new password, you can automate by sending a HTTP GET to the following URL:

{% code overflow="wrap" %}

```
https://linkdomain/signup/password.php?&update=1&siteid=~siteid~&username=~username~&email=~email_address~&old_password=~old_password~&new_password=~new_password~&submit=1
```

{% endcode %}

To update their password to a new password, the following needs to be enabled:

* The config "MEMBER\_PASSWORD\_UPDATE" needs to be enabled
* The parameter update=1 is passed into /signup/password.php script
* By default, member must have their current password, username, and email to update their password

## Related Articles

{% content-ref url="/pages/D0fdWYIloYIg8tDU9Yme" %}
[List of Default Templates](/nats-admin/sites/site-templates/list-of-default-templates.md)
{% endcontent-ref %}
