Hello,

Working with password policy with change_pwd_page is giving me some issues lately because of some conflicts between each other in some case .. here is the first one: Module doesn't work with change_pwd_page module.

another case which is my case here 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 fields ... change_pwd_page is separated

so the user will be stuck on the edit page will no option to update his password..

I've made a patch to fix this ..

reviews is welcomed ..

Thank you

Comments

3ssom created an issue. See original summary.

3ssom’s picture

3ssom’s picture

Title: Redierct error with change_pwd_page! » Redirect error with change_pwd_page!
aohrvetpv’s picture

Thanks for the patch, but there is a more general solution that does not require module-specific integration code:
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.

Password Policy tries to avoid code for integrating with specific contributed modules, because there are very many modules like Password Separate Form that need to integrate with Password Policy.

3ssom’s picture

Hello AohRveTPV,

First of all thank you for your great work on this module :)

Thank you for your reply I'm totally with you on avioding code alteration but what's the harm in making your module with any other module because there is some ppl is using it for a long time ,, its a condition if that module exsits go to that page otherwise anyone can use that patch on #2562481-19 for custom forms!

we faced this issue today on our company and this patch solve it for these 2 module ,, when the exiration runs users got stuck for a whole because we are using 7.x1.12 ..

Best regrads

aohrvetpv’s picture

There are many modules like Password Separate Form that would also need conditions to work well with Password Policy. It is better to find a single solution that works for all modules. Otherwise, we will be adding/modifying conditions indefinitely.

Module-specific integration code also makes the Password Policy code harder to test. To test it properly, you need a test case that enables both modules and tests that they work properly together. It is not practical to write those tests for many modules.

3ssom’s picture

Status: Active » Fixed

Agree ,, I stand corrected ,,

I've tried that patch also ,, and it works like a charm ,,

I'll close this ,, no need for any alteration or patches ,,

Do you know when this will be in a new release?

Thank you

aohrvetpv’s picture

I will plan to commit the patch in a week or two if there are no problems. Then create a new release after a few more weeks if there are no problems, and depending on whether 7.x-1.x-dev is otherwise stable.

Sorry if that seems slow. The patch risks breaking existing module functionality, and 7.x-1.x is the stable branch, so some caution is needed.

3ssom’s picture

I understand ,, the problem is clear I think and these patches are temp. solutions for these cases and will do untill your next stable release :)

If you need a hand in anyway I'd be happy to help!

Thanx for your great work

Status: Fixed » Closed (fixed)

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