User login

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.

Resolution

Searched words: 
invite all dormant users back to a site with an instant login link reinvite your web site's members to come back with a single click mass reset passwords for people who haven't logged in for a while

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.