Hi there - this module is exactly what I want, but there's one issue I've found.

My situation is that I have a bunch of users which I've created manually, using real email addresses and a unique password for each. I'd now like to send emails to these users with the one-time-login link so they can access the site and enter their own password for future use.

So I can send them the link and direct them to the user-edit page - but the problem is that they can't edit their email address or choose a new password without entering their "current" password - which they don't have, and which can't be included as a token in the email.

I've used the http://drupal.org/project/nocurrent_pass module as a workaround, but is there any other way to handle this?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mortona2k’s picture

I have the same issue. I'd like an option to reset their password so they end up on the same page as the default one time login - on the set password page. I'll probably go with the nocurrent_pass route, but still need to force the login redirect to be the user profile edit page instead of view.

Cayenne’s picture

I have addressed this on a few sites by hacking the core to not require the old password. It's very bad to do that, but only takes a few lines in the user module. A little module to do this would be much smarter.

dti21’s picture

Same issue here. It would be great if it could ignore the current password restriction just for the one time login link.

ericmulder1980’s picture

I've been looking for a answer to this issue myself and have found some (perhaps) usefull information on https://drupal.org/node/889772.

On comment #38 there is some usefull information about the core user module and how it adds a token to the users $_SESSION after clicking on a password reset link. Perhaps this is something that can be taken into the Login one time module?

ptmkenny’s picture

@Cayenne (#2): The No Current Password module disables the D7 core password check in general.

arem4ou’s picture

When taking them to user/*/edit, it's difficult to ensure the user will choose a new password because all the other fields are visible on the page also. Thus, perpetuating the issue.

It might also be nice to include a "brief" implementation as seen in the simple_pass_reset module for the password recovery flow.

https://drupal.org/project/simple_pass_reset
Further explanation: http://www.dave-cohen.com/node/1000030

n_potter’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
2.67 KB

I've created a patch that will add an admin option to ignore the current password field (it's in the user section), only when a new login link is requested and the user is redirected to their user edit form. The patch should be able to be run from the module folder, please give it a try and let me know if it's any good.

mortona2k’s picture

I reviewed the code in #7 and applied it. Looks good and works well.

However I'm probably going to stop using this module. I had originally installed it so I can send people one time login links via rules. I don't know why we deviate from the core one time login links instead of just sending those. This could be done in rules with: echo user_pass_reset_url($user);

Seeing this issue made me realize that the button this module puts on user account pages is HORRIBLE UX. It sends people a link so they can get into their account, but if they want to actually change their password, they have to request another password reset link??

Get this patch in, so this module can actually have some utility.

joelpittet’s picture

Version: 7.x-2.8 » 7.x-2.x-dev
Category: Support request » Bug report
Priority: Minor » Critical
FileSize
3.79 KB
3.1 KB

Coding standards clean-up. I think this is RTBC but need someone else to verify.

joelpittet’s picture

Priority: Critical » Major
johnpicozzi’s picture

I reviewed and applied the code in #7 and all looks good and works for me.

joelpittet’s picture

@johnpicozzi RTBC even?

joelpittet’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

Dang since the latest changes, this now needs a reroll.

joelpittet’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
2.28 KB

Ok Re-rolled. (Nice 3way auto merge on rebase!)

  • Maedi committed 80c6540 on 7.x-2.x authored by joelpittet
    Issue #1775458 by joelpittet, n_potter: User-edit page can't be edited...
Maedi’s picture

Status: Needs review » Fixed

Committed to dev. Please test :)

joelpittet’s picture

Thank you @Maedi

Status: Fixed » Closed (fixed)

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