diff --git a/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php b/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php index f135a93..d1a3f8f 100644 --- a/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php +++ b/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php @@ -14,8 +14,8 @@ * @code * $form['pass'] = array( * '#type' => 'password_confirm', - * '#title1' => t('New password'), - * '#title' => $this->t('Password'), + * '#title1' => t('Password'), + * '#title2' => $this->t('Confirm password'), * '#size' => 25, * ); * @endcode diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php index ae8ef1d..99335bc 100644 --- a/core/modules/user/src/AccountForm.php +++ b/core/modules/user/src/AccountForm.php @@ -106,7 +106,7 @@ public function form(array $form, FormStateInterface $form_state) { $form['account']['mail'] = array( '#type' => 'email', '#title' => $this->t('Email address'), - '#description' => $this->t('A valid email address. All emails from the system will be sent to this address. The email address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by email. In case you want to change this email address you also need to confirm your current password.'), + '#description' => $this->t('A valid email address. All emails from the system will be sent to this address. The email address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by email. In case you want to change this email address you also need to provide your current password.'), '#required' => !(!$account->getEmail() && $user->hasPermission('administer users')), '#default_value' => (!$register ? $account->getEmail() : ''), '#weight' => -9, @@ -145,7 +145,7 @@ public function form(array $form, FormStateInterface $form_state) { [':input[name="mail"]' => ['!value' => $account->getEmail()]], [':input[name="pass[pass1]"]' => ['filled' => TRUE]], ], - // Mark the field as required if mail or password has changed. + // Mark the field as required if mail or new password has changed. 'required' => [ [':input[name="mail"]' => ['!value' => $account->getEmail()]], [':input[name="pass[pass1]"]' => ['filled' => TRUE]], @@ -160,7 +160,7 @@ public function form(array $form, FormStateInterface $form_state) { '#title1' => $this->t('New password'), '#title2' => $this->t('Confirm new password'), '#size' => 25, - '#description' => $this->t('To change the current user password, enter the new password here. To be allowed to do this you also need to confirm your current password.'), + '#description' => $this->t('To change the current user password, enter the new password here. In that case you also need to provide your current password.'), '#weight' => -7, );