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.
If you reset your passwod and then click on the button for one time login, you are supposed to go to the password tab on your account. Thats not what happens - it takes the user to an incorrect path on their user page. I have modified the following line on the password_policy_password_tab.module... the password_policy_password_tab_exit() function:
line 68
- $path .= '/password';
+ $path = 'user/'.$args[1].'/password';
Tested and works fine. Sorry its not a real patch file.
Comments
Comment #1
erikwebb CreditAttribution: erikwebb commentedPlease give this a test.
Comment #2
P3t3r CreditAttribution: P3t3r commentedNeither fix works for me (7.x-1.1 on core 7.15). Still getting redirected to the non-password part.
Comment #3
erikwebb CreditAttribution: erikwebb commented@P3t3r - What is the exact URL that you are being redirected to? Is it
/user
or/user/###/edit
?Comment #4
P3t3r CreditAttribution: P3t3r commentedI'm getting redirected to
MYSITE/user/55/edit?pass-reset-token=MhM7TUMSN0Eak5-jCuRZaFHSqehI4awUW-_O_r336wI
I noticed that there has appeared a new wild entry "Password tab" in the root (!) of my admin menu, but the setting there doesn't seem to do anything for this problem (probably it's only for after the pasword is effectively set).
Comment #5
P3t3r CreditAttribution: P3t3r commentedJust installed a brand new Drupal 7.15 with default settings and only password tab and mail system (to receive the registration mail) as modules.
Even after the fix you present above, the problem persists: the login link in the registration looks like
http://m.y.i.p/test/user/reset/5/1344623528/upLdFUqjXZyuhm7q_zCfpjNgpBXhX68hYCMRHvFSz6E
and I end up at page
http://m.y.i.p/test/user/5/edit?pass-reset-token=PalM7vNljHEsKKlystackDcySE7A-OH8aMt43NztTZM
in the browser bar (in IE 7 if it's relevant).
At the edit tab thus. Not at the password tab.
Comment #6
mloigeret CreditAttribution: mloigeret commentedI tried applying this patch to the stable module 7.x-1.1 and it did not work.
I applied the patch password_policy-update_password_change_tab_d7-1330502-23.patch (from http://drupal.org/node/1330502 #23) first and then I could apply the present patch.
But now I get the error Notice : Undefined index: pass in password_policy_password_tab() (line 41 in ....mysite/sites/all/modules/password_policy/contrib/password_tab/password_policy_password_tab.pages.inc).
When I validate the form it seems that there is still a need for the old password, which I am not supposed to have because the user requests to reset his password.
I am using Drupal core 7.15
Am I missing something ?
Comment #7
mloigeret CreditAttribution: mloigeret commentedEasier to reproduce... I get the same error message (i.e. Notice : Undefined index: pass in password_policy_password_tab() (line 41 dans .....mysite/sites/all/modules/password_policy/contrib/password_tab/password_policy_password_tab.pages.inc). if I apply this patch over dev version 7.x-1.x-dev .
Comment #8
erikwebb CreditAttribution: erikwebb commentedSince Password tab is now committed with the 7.x-1.2 release, this may need some new testing.
Comment #9
chaloum CreditAttribution: chaloum commentedif you change line 80 in the password_policy_tab.module from
$path .= '/password';
to
$path=str_replace("/edit","/password",$path);
It should work for you
Comment #10
erikwebb CreditAttribution: erikwebb commentedCleaner is always better.
Comment #11
erikwebb CreditAttribution: erikwebb commentedNew and improved!
Comment #12
villette CreditAttribution: villette commentedI have updated the patch #11 to work with the versions from 7.x-1.4
Comment #14
jacktonkin CreditAttribution: jacktonkin commented12: password_policy-incorrect_redirect_after_reset-1680146-12.patch queued for re-testing.
Comment #16
AohRveTPV CreditAttribution: AohRveTPV commentedNew patch, same code as #12. Reproduced problem and confirmed this fixes.
Comment #18
AohRveTPV CreditAttribution: AohRveTPV commentedD6 doesn't have
hook_drupal_goto_alter()
, so this will require a different approach for 6.x, assuming the bug exists there.Comment #19
AohRveTPV CreditAttribution: AohRveTPV commentedComment #20
AohRveTPV CreditAttribution: AohRveTPV commentedDoes not affect 6.x-1.x. This bug was due to attempting to redirect to the 6.x-1.x Password Tab password page path (
user/X/edit/password
) instead of the proper 7.x-1.x path (user/X/password
).