Several places in the password_policy.module make reference to the location of the password_policy_password_tab's password tab were not updated when that module was updated to place the password tab under the 'edit' path.
#1
Issue: Once your password has expired, you are not able to navigate to the password tab to make the change.
In password_policy_init(), line 34 needs to be changed from:
$change_password_url = 'user/'. $account->uid .'/'. (module_exists('password_policy_password_tab') ? 'password' : 'edit');
to:
$change_password_url = 'user/'. $account->uid .'/edit'. (module_exists('password_policy_password_tab') ? '/password' : '');
#2
In password_policy_user(), line 307 needs to be changed from:
drupal_goto('user/'. $account->uid .'/'. (module_exists('password_policy_password_tab') ? 'password' : 'edit'), $destination);
to:
drupal_goto('user/'. $account->uid .'/edit'. (module_exists('password_policy_password_tab') ? '/password' : ''), $destination);
#3
In password_policy_mail_tokens(), line 620 needs to be changed from:
'!edit_uri' => url('user/'. $account->uid .'/'. (module_exists('password_policy_password_tab') ? 'password' : 'edit'), array('absolute' => TRUE)),
to:
'!edit_uri' => url('user/'. $account->uid .'/edit'. (module_exists('password_policy_password_tab') ? '/password' : ''), array('absolute' => TRUE)),
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | change-password-link-fix-1189756-12.patch | 756 bytes | artkon |
| #11 | change-password-link-fix-1189756-11.patch | 717 bytes | artkon |
| #1 | cannot-change-password-expired-1189756-2.patch | 2.12 KB | draenen |
Comments
Comment #1
draenen commentedThe attached patch makes the changes listed above.
Comment #2
ataxia commentedImmediately after installing and configuring this module, I was locked out and unable to change my password. I made these changes manually rather than installing the patch, and they worked great.
Thanks!
Comment #3
draenen commentedDid the patch fail?
Comment #4
technikh commentedThanks for the patch. the patch worked for me.
Comment #5
Crom commented+1. Thanks.
Comment #6
erikwebb commentedFixed and committed!
http://drupalcode.org/project/password_policy.git/commit/e1781456802448e...
Comment #8
phen commentedNeeds to be ported to D7.
Comment #9
erikwebb commentedComment #10
erikwebb commentedActually, I don't think this needs to be ported to 7.x-1.x. The fix is contained in #1330502: Update password change tab to Drupal 7.
Comment #11
artkon commentedI'm putting up another patch that targets version 1.5 for those who have only non-dev release versions of modules on their production servers.
Patch doesn't work with chgpwd module, use below
Comment #12
artkon commentedCorrected patch for 1.5
Comment #13
erikwebb commented@artkon - Those changes should be rolled into 6.x-1.5 at release (and not in any specific -dev release). What's the current problem?