Hi,
I've seen that MR 20 already addresses the missing submit handler issue, but after applying it, I've noticed it doesn't actually store the values of Password Policy module fields (field_last_password_reset, field_password_expiration and field_pending_expire_sent) in the user entity upon submission.
To resolve this, I've created a patch that explicitly assigns these field values from $form_state to the user entity within the submit handler, ensuring these fields are properly saved.
The attached patch fully resolves the described issue. Please feel free to suggest or apply any improvements or adjustments as needed.
For additional context, these are the versions of Drupal core and both modules:
- Drupal core: 10.4.6
- Password Policy module: 4.0.3
- Change Pwd Page module: 2.0.0
I've updated the merge request to make it compatible with version 3.5.0
Adding patch to make this work with 1.9
evamtinez β made their first commit to this issueβs fork.
Same error in Drupal 10.3.13. Fixed with the MR created in #3
Fixed patch including hook_update. Thanks @facine.
Patch #24 is working for me in Drupal 8.9.16 and PHP 7.1.