Is there a module that would auto-generate custom unique one-time-use URLs that timeout after a set time, and can be used to accomplish tasks and progress workflows in Drupal 7?

Use Case 1

User must click link in email to verify their address is valid.

Use Case 2

As part of a workflow process users must confirm they wish to complete an action by clicking on the appropriate link in an email message and depending on the link chosen the node would progress to a different state in the workflow


You can copy function "user_pass_reset_url" and form "user_pass_reset" and customize it for your needs. With first you create custom link and with the second you can get "one-time-link" logic.


I was having some problems generating the one time login URL using the Drupal 7 documentation, This worked for me.

$mail = 'someone@yoursite.com';  
// Load the user.
$account= user_load_by_mail($mail);
$url = user_pass_reset_url($account);
print '$url';
  • What about the scenario when the user does not exist yet? – pal4life Oct 30 '14 at 0:43
  • Good point...i was dynamically creating the user based on the email address associated with the node, then building an email address to send to them with this link included. – Lee Woodman Oct 30 '14 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.