Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Password Reset by Code

14 sites No security coverage Drupal 10–11
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

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Dec 2025
Latest release
4 months ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

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