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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

erikwebb’s picture

Component: Code » Password tab
Status: Active » Needs review
FileSize
1.08 KB

Please give this a test.

P3t3r’s picture

Version: 7.x-1.x-dev » 7.x-1.1
Status: Needs review » Active

Neither fix works for me (7.x-1.1 on core 7.15). Still getting redirected to the non-password part.

erikwebb’s picture

@P3t3r - What is the exact URL that you are being redirected to? Is it /user or /user/###/edit?

P3t3r’s picture

I'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).

P3t3r’s picture

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

mloigeret’s picture

I 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 ?

mloigeret’s picture

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

erikwebb’s picture

Version: 7.x-1.1 » 7.x-1.2
Status: Active » Postponed (maintainer needs more info)

Since Password tab is now committed with the 7.x-1.2 release, this may need some new testing.

chaloum’s picture

if 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

erikwebb’s picture

Version: 7.x-1.2 » 7.x-1.3
Component: Password tab » Code
Status: Postponed (maintainer needs more info) » Needs review
FileSize
1.93 KB

Cleaner is always better.

erikwebb’s picture

villette’s picture

I have updated the patch #11 to work with the versions from 7.x-1.4

Status: Needs review » Needs work
jacktonkin’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
AohRveTPV’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Status: Needs work » Needs review
FileSize
1.95 KB

New patch, same code as #12. Reproduced problem and confirmed this fixes.

  • Commit e59df9a on 7.x-1.x by AohRveTPV:
    Issue #1680146 by erikwebb, AohRveTPV: Incorrect redirect after password...
AohRveTPV’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev

D6 doesn't have hook_drupal_goto_alter(), so this will require a different approach for 6.x, assuming the bug exists there.

AohRveTPV’s picture

Status: Needs review » Active
AohRveTPV’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Fixed

Does 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).

Status: Fixed » Closed (fixed)

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