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.
When a user is blocked due to password expiration, the administrator can unblock the user via the "Expired accounts" page. The user will then have one day to log in and change their password. If the user does not log in within one day, they will be blocked again. At this point an administrator should be able to unblock the user again, but it does not work.
Comments
Comment #1
AohRveTPV CreditAttribution: AohRveTPV commentedTest to reproduce the bug. Requires first applying the patch in #2467941: Mock time retrievals for testing, which allows the test to control time.
Comment #2
AohRveTPV CreditAttribution: AohRveTPV commentedUpdated test to reproduce the bug. No longer requires applying a second patch as did previous patch.
Comment #3
AohRveTPV CreditAttribution: AohRveTPV commentedFixed bug.
The problem was the existing code expected "unblocked" to be null for a user who had been blocked due to password expiration. But when a user was blocked after being unblocked, "unblocked" is not null; it is the time the user was unblocked. So we add a condition that detects when a user has been reblocked after being unblocked.
Also expanded test to actually attempt logins.
Comment #5
AohRveTPV CreditAttribution: AohRveTPV commentedUpdated to apply on latest code.
Comment #7
AohRveTPV CreditAttribution: AohRveTPV commentedAttempted to fix previous patch.
Comment #9
AohRveTPV CreditAttribution: AohRveTPV commentedComment #10
AohRveTPV CreditAttribution: AohRveTPV commentedComment #11
AohRveTPV CreditAttribution: AohRveTPV commented6.x-1.x is no longer supported.