I was having users complain that the one-time login's weren't working and that they were being prompted for their current password to change it (which if they had they wouldn't have needed to be sent a login link). In looking at it I noticed that they were sent to user/[uid]/edituser/password . This caught me off guard and I thought it looked a bit odd that they were merged together. Looking through the password_tab contrib code I noticed that the url is created with:

$path .= preg_replace('/\/edit$/', '/password', $path); but it shouldn't be a concatenated onto the end rather it should be replaced. Simply changing it to:

$path = preg_replace('/\/edit$/', '/password', $path); fixed all my issues and now the routing is correct.

Now this is against the 7.1 version and I saw that 7.2 has the password tab split out but wanted to report it for anyone else running into the same issues.

Comments

erikwebb’s picture

Please verify this patch and I'll get this fixed up.

ckoharj’s picture

In case this helps. I noticed that this is only a problem when you use the "password change tab". If you disable that in Modules then the request password works correctly.
Thanks,

cellar door’s picture

erikwebb - patch looks good to me. Simple one liner

ckoharj’s picture

Applied the patch but now getting the following error on the page emailed to user for resetting the password.

Notice: Undefined index: pass in password_policy_password_tab() (line 41 of /home1/cyclonew/public_html/mcacdst/sites/all/modules/password_policy/contrib/password_tab/password_policy_password_tab.pages.inc).

erikwebb’s picture

This issue doesn't look related to this particular bug. Maybe that's a separate issue to file.

ckoharj’s picture

I think it is still related to the issue described in the summary. This most recent error only appeared after installing the patch. It did fix the issue where the user was prompted for current password but this error was not there before the patch.
Hope that helps. Thanks,

cellar door’s picture

Status: Needs review » Reviewed & tested by the community

Can this get committed? I've got a few projects that could use it

erikwebb’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the RTBC. I've committed the patch.

http://drupalcode.org/project/password_policy.git/commit/d9a89c6

ckoharj’s picture

Thanks. I'm not sure what commit means. Is this latest patch in the 7.x-1.5 release or does that release still need the patch?

erikwebb’s picture

It will be in 7.x-1.6 when that is released. Since this is the only change since 7.x-1.5 was released, I probably won't put out a new release until I get a few more bugs resolved.

ckoharj’s picture

Thanks.

Status: Fixed » Closed (fixed)

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