= 7) { $account = user_load(1); } else { $account = user_load(array('uid' => 1)); } if (empty($account)) { return drush_set_error('PROVISION_UNABLE_TO_LOAD_UID_1', 'Could not load the admin user with uid 1 on this site.'); } $onetime = user_pass_reset_url($account) . '/login'; // pass the login link to the front end drush_set_option('login_link', $onetime); drush_log(dt('Login url: !onetime', array('!onetime' => $onetime)), 'success'); if (drush_drupal_major_version() >= 7) { drupal_session_destroy_uid(1); } else { // valid for d5 and d6 sess_destroy_uid(1); } }