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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pjohn created an issue. See original summary.

3ssom’s picture

Category: Feature request » Bug report
Status: Active » Reviewed & tested by the community

Hello,

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

Status: Reviewed & tested by the community » Needs work

The last submitted patch, include_change_pwd_form.patch, failed testing.

AohRveTPV’s picture

Status: Needs work » Postponed (maintainer needs more info)

Thanks 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.

3ssom’s picture

Hello 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

AohRveTPV’s picture

3ssom, 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.

3ssom’s picture

Hello AohRveTPV,

Yes correct I did see #19 there didn't see patch #4 which I guess covers this as well ,,

Thank you

AohRveTPV’s picture

Version: 7.x-1.11 » 7.x-1.x-dev
Status: Postponed (maintainer needs more info) » Fixed

Password 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.