Currently when you use a one time login link user_pass_reset() redirects the user to user/%user/edit.
If you use hook_menu_alter to change the default user edit tab to be a different profile tab (for example a profile2 tab) then this whole system breaks.
This is because you end up on a profile tab with the pass-reset-token query parameter but there is no password field on the page.
Then you click to go to the user account page and you have lost your pass-reset-token parameter, which means you are then asked to enter your existing password to set a new password.
A simple solution to this would be to make the user_pass_reset() function redirect to user/%user/edit/account.
Note: This might be considered instead to be a feature request but it isn't really a new feature.
Comment | File | Size | Author |
---|---|---|---|
#1 | drupal-pass_reset_redirect-1479596-1.patch | 1.69 KB | rooby |
Comments
Comment #1
rooby CreditAttribution: rooby commentedHere is the patch.
Comment #2
kscheirer#1: drupal-pass_reset_redirect-1479596-1.patch queued for re-testing.
Comment #3
kscheirerRetesting against latest HEAD since it has been over a year.
Comment #13
roderikThis seems outdated, because neither user/%user/edit/account nor hook_menu_alter exist for D8. I guess stuff happened before the D8.0 release, and I'm going to go out on a limb and guess this isn't a feature request for D7 anymore.