Commit c82f5d4a authored by helmo's avatar helmo

Issue #2169287 by cableman0408: Fixed Setting user name twice (fails...

Issue #2169287 by cableman0408: Fixed Setting user name twice (fails non-default installation profile).
parent 77a1d1ab
......@@ -154,19 +154,7 @@ function install_main() {
}
_provision_drupal_create_directories();
// create the admin account
$account = user_load(1);
$edit['name'] = $name;
$edit['pass'] = $account_pass;
$edit['mail'] = $client_email;
$edit['status'] = 1;
// temporarily disable drupal's default mail notification
$prev = variable_get('user_mail_status_activated_notify', TRUE);
variable_set('user_mail_status_activated_notify', FALSE);
$account = user_save($account, $edit);
variable_set('user_mail_status_activated_notify', $prev);
$onetime = user_pass_reset_url($account);
// Store the one time login link in an option so the front end can direct the user to their new site.
drush_set_option('login_link', $onetime . '/login');
......
......@@ -156,18 +156,7 @@ function install_main() {
}
_provision_drupal_create_directories();
// create the admin account
$account = user_load(1);
$account->name = 'admin';
$account->pass = $account_pass;
$account->mail = $client_email;
$account->status = 1;
// temporarily disable drupal's default mail notification
$prev = \Drupal::config('user.settings')->get('notify:status_activated');
\Drupal::config('user.settings')->set('notify:status_activated', FALSE);
$account->save();
\Drupal::config('user.settings')->set('notify:status_activated', $prev);
$onetime = user_pass_reset_url($account);
// Store the one time login link in an option so the front end can direct the user to their new site.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment