diff --git a/core/modules/user/src/Tests/UserEditTest.php b/core/modules/user/src/Tests/UserEditTest.php index a9176df..b672f10 100644 --- a/core/modules/user/src/Tests/UserEditTest.php +++ b/core/modules/user/src/Tests/UserEditTest.php @@ -86,7 +86,7 @@ function testUserEdit() { $edit = array(); $edit['mail'] = $this->randomMachineName() . '@new.example.com'; $this->drupalPostForm("user/" . $user1->id() . "/edit", $edit, t('Save')); - $this->assertRaw(t("Your current password is missing or incorrect; it's required to change the \"%name\" field.", array('%name' => 'Email address'))); + $this->assertRaw(t("Your current password is missing or incorrect; it is required to change the \"%name\" field.", array('%name' => 'Email address'))); $edit['current_pass'] = $user1->pass_raw; $this->drupalPostForm("user/" . $user1->id() . "/edit", $edit, t('Save')); @@ -97,7 +97,7 @@ function testUserEdit() { $edit['pass[pass1]'] = $new_pass = $this->randomMachineName(); $edit['pass[pass2]'] = $new_pass; $this->drupalPostForm("user/" . $user1->id() . "/edit", $edit, t('Save')); - $this->assertRaw(t("Your current password is missing or incorrect; it's required to change the \"%name\" field.", array('%name' => 'New password'))); + $this->assertRaw(t("Your current password is missing or incorrect; it is required to change the \"%name\" field.", array('%name' => 'New password'))); // Try again with the current password. $edit['current_pass'] = $user1->pass_raw; diff --git a/core/modules/user/src/Tests/UserPasswordResetTest.php b/core/modules/user/src/Tests/UserPasswordResetTest.php index 9a69f9f..187adc4 100644 --- a/core/modules/user/src/Tests/UserPasswordResetTest.php +++ b/core/modules/user/src/Tests/UserPasswordResetTest.php @@ -117,7 +117,7 @@ function testUserPasswordReset() { // Verify that the password reset session has been destroyed. $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertText(t('Your current password is missing or incorrect; it\'s required to change the "New password" field.'), 'Password needed to make profile changes.'); + $this->assertText(t('Your current password is missing or incorrect; it is required to change the "New password" field.'), 'Password needed to make profile changes.'); // Log out, and try to log in again using the same one-time link. $this->drupalLogout(); diff --git a/core/modules/user/user.module b/core/modules/user/user.module index e73b55b..210397e 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -435,7 +435,7 @@ function user_validate_current_pass(&$form, FormStateInterface $form_state) { if ((strlen(trim($form_state->getValue($key))) > 0) && ($form_state->getValue($key) != $current_value)) { $current_pass_failed = $form_state->isValueEmpty('current_pass') || !\Drupal::service('password')->check($form_state->getValue('current_pass'), $account); if ($current_pass_failed) { - $form_state->setErrorByName('current_pass', t("Your current password is missing or incorrect; it's required to change the \"%name\" field.", array('%name' => $name))); + $form_state->setErrorByName('current_pass', t("Your current password is missing or incorrect; it is required to change the \"%name\" field.", array('%name' => $name))); $form_state->setErrorByName($key); } // We only need to check the password once.