Reinvite module: using the Drupal user_pass_reset_url function
Reinvite module: (mis)using Drupal's core function to generate instant login links for long-lost users.
All the answers we need are in the user password submit function:
http://api.drupal.org/api/function/user_pass_submit/4.7
<?php
$variables = array('!username' => $account->name, '!site' => variable_get('site_name', 'Drupal'), '!login_url' => user_pass_reset_url($account), '!uri' => $base_url, '!uri_brief' => preg_replace('!^https?://!', '', $base_url), '!mailto' => $account->mail, '!date' => format_date(time()), '!login_uri' => url('user', NULL, NULL, TRUE), '!edit_uri' => url('user/'. $account->uid .'/edit', NULL, NULL, TRUE));
?>
Here's the key function, latest version of Drupal:
http://api.drupal.org/api/function/user_pass_reset_url
Note: Reinvite is working in Drupal 4.7 for the Amazing Things Annual Fundraising Auction Web Site, but a complete upgrade to Drupal 5 would be trivial.
Comments
Post new comment