Create hook_update to remove duplicated entries in password_policy_history

Created on 23 February 2022, over 2 years ago
Updated 17 March 2023, over 1 year ago

Problem/Motivation

This issue is a follow-up issue to create a hook_update to remove duplicated entries in the password_policy_history table.
The problem was fixed in #3095980: Password history policy inserts password twice in password_policy_history table but it was not created the hook_update there.

Steps to reproduce

This issue exists for sites those who already have the module installed or those not using the latest dev.

- Install version composer require 'drupal/password_policy:^3.1' (Current Release) as of 06/07/2022
- Configure the module to have a site policy
- Create a new user or edit password of the existing user
- Check the password_policy_history table there will be duplicate entries of the same user request

- Note: this issue has been fixed https://www.drupal.org/project/password_policy/issues/3095980 and is avaliable in latest dev 'drupal/password_policy:3.x-dev@dev'
- But it does not handle the already existing entries made before the fixed
- Apply the patch from below MR
- The duplicate entries will be removed.

📌 Task
Status

Fixed

Version

3.0

Component

Code

Created by

🇧🇷Brazil paulocs Belo Horizonte

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024