reset.login.provision.inc 596 Bytes
Newer Older
1 2 3 4 5 6 7
<?php
/**
 * @file
 *   Provision hooks for the provision login_reset command.
 */

/**
8
 * Provision login-reset command
9 10 11 12 13 14 15 16
 *
 * These are the hooks that will be executed by the drush_invoke function
 * when generating a one-time login reset URL.
 */

/**
 * Generate a one-time login reset url
 */
17
function drush_provision_drupal_provision_login_reset() {
18
  // pass the login link to the front end
19 20
  drush_set_option('browser', FALSE);
  $onetime = drush_user_login();
21
  drush_set_option('login_link', $onetime);
22
  drush_log(dt('Login url: !onetime', array('!onetime' => $onetime)), 'success');
23
}