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.
I'm working on a site that uses both Password Policy and Password Separate Form. Password Policy's policies are not enforced on the page provided by Separate Form. The attached patch fixes that issue.
Comment | File | Size | Author |
---|---|---|---|
include_change_pwd_form.patch | 727 bytes | pjohn | |
Comments
Comment #2
3ssom CreditAttribution: 3ssom commentedHello,
Exactly I was about to do the same thing .. I came here to put the patch but I found your issue which has the same thing I have(case and the patch) .. since you attached the patch on need for mine :)
But you have another scenarios using these 2 modules maybe you didn't face yet ,, which I did!
its when a user password expires or forced to change it and try to do that .. password policy will redirect him to user/%/edit which it doesn't have the password change ... change_pwd_page is separated
anyway ,, I've solved that and will put the patch in an another issue ,, but I wanted to point this out to you since you are using the same modules :)
Also I think this should be a bug .. the patch is fixing that .. passed I've tested it.
Thank you
Comment #4
AohRveTPV CreditAttribution: AohRveTPV commentedThanks to both of you for the patches. As I just posted in #2865017: Redirect error with change_pwd_page!, there is a way to solve this problem that does not require a patch specifically for Password Separate Form:
1. Specify
user/[user:uid]/change-password
in the "Password change form path" field. (This feature is available in 7.x-1.x-dev.)2. Apply the patch in #2562481-19: Apply password policies to account password elements on custom forms.
It would be helpful to know whether that works.
Comment #5
3ssom CreditAttribution: 3ssom commentedHello AohRveTPV,
are you sure this issue is the same? this is including the policy rule in page where you change the password ..
its doesn't apply there because the form_id is not including ..
Thanx
Comment #6
AohRveTPV CreditAttribution: AohRveTPV commented3ssom, the patch I linked in #4 makes specifying form IDs unnecessary. It applies policies to any form that has an account password element. That is, if
$form['account']['pass']
is present and has type 'password_confirm', policies are applied to it. That should work for the password element on the Password Separate Form form, as well as any other module that puts password elements on a different form.Comment #7
3ssom CreditAttribution: 3ssom commentedHello AohRveTPV,
Yes correct I did see #19 there didn't see patch #4 which I guess covers this as well ,,
Thank you
Comment #8
AohRveTPV CreditAttribution: AohRveTPV commentedPassword Separate Form should now work with Password Policy 7.x-1.x-dev if you enter
user/[user:uid]/change-password
in the Password Policy "Password change form path" settings field.(No patching is necessary now that #2562481: Apply password policies to account password elements on custom forms is implemented in 7.x-1.x.)
Please re-open if that does not work.