Creating a password policy that includes the variable to only allow a user to change their password once every 24 hours works flawlessly except when a user goes to reset their password.
Drupal core (I assume) resets the password for the user and then sends them the one-time log in link. The user then is prompted to change their password. They are then unable to change their password within the 24 hour window because drupal core just changed it.
An exception to the 24 hour rule should be made when drupal core is changing the user's password so this doesn't trigger the event. A seperate configurable should also be implemented to disable the ability for a user to reset their password as many times as they wish via the one-time link system.
Comments
Comment #1
Traverus commentedAnother way to solve this would be to add a configurable to allow X number of password changes in X time (e.g. 2 in 24 hours)
Comment #2
erikwebb commentedIf this is a bug, it's probably referring to 7.x-1.x
Comment #3
erikwebb commentedThis is related to #1596960: Force password change on first-time login requires password to change
I need to fix the other issue before this can be resolved.
Comment #4
erikwebb commentedCan this be added on to the work in #1468172: "Delay" constraint combined with "Force password change on next login" can result in a temporary catch-22 for the user?
Comment #5
slefevre1 commentedI seem to have just encountered this in version 7.x-1.6. I went to /user/pass to get the password reset link, and then on the /user/edit page, I get `Your password has not met the following requirement(s): Password may only be changed in 24 hours from the last change.`
Comment #6
aohrvetpv commentedCannot reproduce:
1. Download/enable 7.x-1.6.
2. Log in as administrator.
3. Create policy with delay 24.
4. Enable policy.
5. Log out.
6. Request password reset for user 'foo'.
7. Browse to received password reset URL.
8. Change password successfully.
What are you doing differently? Am I misunderstanding the problem?
If you are performing the same steps but getting a different result, something must be different about your configuration, so please give steps for reproducing the problem from a freshly installed Drupal 7 site.
Comment #7
aohrvetpv commentedA month has passed with no information on how to reproduce this. Please re-open if you still have this issue.