Commit 22d6d6ca authored by Sang Lostrie's avatar Sang Lostrie 🇵🇸
Browse files

Use addWarning() for warning message.

parent 3fc6a666
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
langcode: en
sharedemail_msg: 'WARNING: The e-mail address you are using, has already been registered on this site by another user. You should be aware that personal information such as password resets will be sent to this address. We strongly recommend changing your registered address to a different e-mail address. You can do this at any time from your account page when you login.'
sharedemail_msg: 'The e-mail address you are using, has already been registered on this site by another user. You should be aware that personal information such as password resets will be sent to this address. We strongly recommend changing your registered address to a different e-mail address. You can do this at any time from your account page when you login.'
sharedemail_allowed: ''
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ function _sharedemail_form_submit($form, &$form_state) {
      ->loadByProperties(['mail' => $form['account']['mail']['#value']]);
    if ($users !== NULL && count($users) > 1) {
      $config = \Drupal::config('sharedemail.settings');
      \Drupal::messenger()->addStatus($config->get('sharedemail_msg'));
      \Drupal::messenger()->addWarning($config->get('sharedemail_msg'));
    }
  }