Drupal is a registered trademark of Dries Buytaert

password_reset_code

13 sites No security coverage
View on drupal.org

A Drupal module that provides functionality for managing password reset codes and user authentication recovery.

Features

  • Generate and manage secure password reset codes
  • Enhanced user authentication recovery
  • Time-limited reset code validation
  • Customizable reset code settings
  • Seamless integration with Drupal's user management system

Requirements

  • Drupal 10.1, 11, or 12
  • PHP 8.0 or higher

Installation

Using Composer

  1. Navigate to your Drupal root directory
  2. Run the following command:
    composer require 'drupal/password_reset_code:^1.0'

Manual Installation

  1. Download the module to your Drupal `modules` directory
  2. Enable the module:

    drush en password_reset_code

Or navigate to Admin > Extend and enable the module through the UI

Configuration

After enabling the module, navigate to the module configuration page Admin > Configuration > People > Password reset by code to:

  • Configure password reset code expiration time & maximum code attempts.
  • Configure user messages for successful and failed password resets.

Configure password recovery email template from Admin > Configuration > People > Account settings:

  • <p>Hi [user:display-name],</p>
    
    <p>Forgotten your password? Don’t worry, click the link below to reset your password.  Please note the link is only available for 24 hours. </p>
    
    <p>You may now log in by clicking this link or copying and pasting it into your browser:</p>
    
    <h3><a href="[one-time-reset-login-link]">Click here to reset your password</a></h3>
    
    <p>Your verification code: [one-time-verification-code]</p>
    
    <p>[site:name] team</p>
  • [one-time-reset-login-link] & [one-time-verification-code] are replaced with the actual values at runtime.

Permissions

The module provides the following permissions:

  • Administer password reset codes - Full access to password reset functionality
  • Additional permissions may be configured based on your needs

Usage

For Users

1. Navigate to the password reset page
2. Enter your email address
3. Check your email for the password reset code
4. Follow the link to reset your password

For Administrators

Access password reset code management from Admin > Configuration > People > Password reset by code to:

  • View active reset codes
  • Revoke or extend reset codes
  • Configure reset code policies

Activity

Total releases
3
First release
Dec 2025
Latest release
1 month ago
Release cadence
21 days
Stability
100% stable

Release Timeline

Releases

Version Type Release date
1.0.2 Stable Jan 20, 2026
1.0.1 Stable Jan 14, 2026
1.0.0 Stable Dec 10, 2025