Commit de55e651 authored by Nathan Lisgo's avatar Nathan Lisgo Committed by Alex Pott
Browse files

Issue #2495935 by nlisgo, yched, alexpott: drush site-install --account-* options broken

parent 290fa909
Loading
Loading
Loading
Loading
+8
Changes for src/Form/SiteConfigureForm.php: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -163,6 +163,14 @@ class SiteConfigureForm extends FormBase {
      '#required' => TRUE,
    );

    // Use default drush options if available whilst running a site install.
    if (function_exists('drush_get_option') && function_exists('drush_generate_password')) {
      $form['admin_account']['account']['name']['#default_value'] = drush_get_option('account-name', 'admin');
      $form['admin_account']['account']['pass']['type'] = 'textfield';
      $form['admin_account']['account']['pass']['#default_value'] = drush_get_option('account-pass', drush_generate_password());
      $form['admin_account']['account']['mail']['#default_value'] = drush_get_option('account-mail', 'admin@example.com');
    }

    $form['actions'] = array('#type' => 'actions');
    $form['actions']['submit'] = array(
      '#type' => 'submit',