diff --git a/core/modules/user/lib/Drupal/user/AccountFormController.php b/core/modules/user/lib/Drupal/user/AccountFormController.php index 8f2f0c5..13da79d 100644 --- a/core/modules/user/lib/Drupal/user/AccountFormController.php +++ b/core/modules/user/lib/Drupal/user/AccountFormController.php @@ -156,6 +156,7 @@ public function form(array $form, array &$form_state, EntityInterface $account) '#type' => 'checkbox', '#title' => t('Notify user of new account'), '#access' => $register && $admin, + '#default_value' => $register && $admin ? TRUE, ); // Signature. diff --git a/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php b/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php index 349b2a9..561de0f 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserRolesAssignmentTest.php @@ -65,7 +65,7 @@ function testCreateUserWithRole() { "roles[$rid]" => $rid, ); $this->drupalPost('admin/people/create', $edit, t('Create new account')); - $this->assertText(t('Created a new user account for !name.', array('!name' => $edit['name']))); + $this->assertText(t('A welcome message with further instructions has been e-mailed to the new user !name.', array('!name' => $edit['name']))); // Get the newly added user. $account = user_load_by_name($edit['name']);