/[drupal]/contributions/modules/provision/platform/login_reset.provision.inc
ViewVC logotype

Contents of /contributions/modules/provision/platform/login_reset.provision.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Fri Oct 23 00:01:17 2009 UTC (5 weeks, 2 days ago) by adrian
Branch: MAIN
CVS Tags: DRUPAL-6--0-4-ALPHA3, HEAD
File MIME type: text/x-php
#567094 - reset password task
1 <?php
2 /**
3 * @file
4 * Provision hooks for the provision login_reset command.
5 */
6
7 /**
8 * Provision login_reset command
9 *
10 * These are the hooks that will be executed by the drush_invoke function
11 * when generating a one-time login reset URL.
12 */
13
14 /**
15 * Generate a one-time login reset url
16 */
17 function drush_provision_drupal_provision_login_reset($url) {
18 drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_FULL);
19 $account = user_load(1);
20 $onetime = user_pass_reset_url($account);
21 // pass the login link to the front end
22 drush_set_option('login_link', $onetime);
23 drush_log(t('Login url: !onetime', array('!onetime' => $onetime)), 'message');
24 sess_destroy_uid(1);
25 }

  ViewVC Help
Powered by ViewVC 1.1.2