Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
password_policy keeps a history of all user password changes However, this when a user changes their password using the password reset link from this module, the password change is not recorded.
Comments
Comment #1
mrfelton CreditAttribution: mrfelton commentedThis is all thats needed.
Comment #3
SolomonGifford CreditAttribution: SolomonGifford commentedIs there a reason not to do this with hook_user_presave in the password_policy module?
Comment #4
gregglesMoving to a better place to discuss the proposal in #3.
Comment #5
erikwebb CreditAttribution: erikwebb commentedThat makes sense to me. You have my blessing.
Comment #6
hanoiiI had the necessity ro re-roll the original patch for password_hustle for the time being, so leaving here for reference, but any follow up on using presave on password policy?
Comment #7
AohRveTPV CreditAttribution: AohRveTPV commentedNew features go into 7.x-2.x first, but here is a 7.x-1.x patch for review/testing.
Comment #8
AohRveTPV CreditAttribution: AohRveTPV commentedComment #9
AohRveTPV CreditAttribution: AohRveTPV commentedDiscovered bug in 7.x-1.x when porting #7 to 7.x-2.x:
#2462647: Two password history entries created for new users, one invalid
Comment #10
AohRveTPV CreditAttribution: AohRveTPV commentedPlease review/test.
Comment #11
AohRveTPV CreditAttribution: AohRveTPV commentedSimplify conditions in
hook_user_presave()
.Comment #12
AohRveTPV CreditAttribution: AohRveTPV commentedUpdate to apply on latest code.
Comment #13
AohRveTPV CreditAttribution: AohRveTPV commentedI am committing #12 without review for the sake of testing. We already switched to
hook_user_presave()
in 7.x-1.x to fix #2462647: Two password history entries created for new users, one invalid. By committing the same change to 7.x-2.x, we can get some testing of this change in an alpha release before making a full release of the change in 7.x-1.x.Would still be glad for any review/testing of this change.
Comment #15
AohRveTPV CreditAttribution: AohRveTPV commentedComment #16
AohRveTPV CreditAttribution: AohRveTPV commented6.x-1.x is no longer supported.