Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / user / src / Form / UserPasswordForm.php
index 972f8250b3dd4aec26463d7155998df93110b5e5..b805641989765230c9e228bc1f75f7eb5cf6b099 100644 (file)
@@ -11,6 +11,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * Provides a user password reset form.
+ *
+ * @internal
  */
 class UserPasswordForm extends FormBase {
 
@@ -138,7 +140,7 @@ class UserPasswordForm extends FormBase {
     $mail = _user_mail_notify('password_reset', $account, $langcode);
     if (!empty($mail)) {
       $this->logger('user')->notice('Password reset instructions mailed to %name at %email.', ['%name' => $account->getUsername(), '%email' => $account->getEmail()]);
-      drupal_set_message($this->t('Further instructions have been sent to your email address.'));
+      $this->messenger()->addStatus($this->t('Further instructions have been sent to your email address.'));
     }
 
     $form_state->setRedirect('user.page');