Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Password Reset by Code

12 sites No security coverage
View on drupal.org

This module enhances Drupal's password recovery system by generating and managing secure, time-limited password reset codes. It also offers customizable settings for these codes and integrates smoothly with Drupal's core user management.

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
4
First release
Dec 2025
Latest release
3 months ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

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