diff --git a/core/modules/user/src/Controller/UserAuthenticationController.php b/core/modules/user/src/Controller/UserAuthenticationController.php index 718adb1e83ede3f2a76c9f6549bcd30099e7719f..9b4ddc5c1aeb01634d6f3173010934d3d23500d0 100644 --- a/core/modules/user/src/Controller/UserAuthenticationController.php +++ b/core/modules/user/src/Controller/UserAuthenticationController.php @@ -260,7 +260,7 @@ public function resetPassword(Request $request) { throw new BadRequestHttpException('Unable to send email. Contact the site administrator if the problem persists.'); } else { - $this->logger->notice('Password reset instructions mailed to %name at %email.', ['%name' => $account->getAccountName(), '%email' => $account->getEmail()]); + $this->logger->info('Password reset instructions mailed to %name at %email.', ['%name' => $account->getAccountName(), '%email' => $account->getEmail()]); return new Response(); } } diff --git a/core/modules/user/src/Controller/UserController.php b/core/modules/user/src/Controller/UserController.php index ec5b1ccfad0e67abf32f6c4a076c4d85cb38a6bc..97c6bb5bd7fa30d4dd88ad7717c2eb7525332af0 100644 --- a/core/modules/user/src/Controller/UserController.php +++ b/core/modules/user/src/Controller/UserController.php @@ -236,7 +236,7 @@ public function resetPassLogin($uid, $timestamp, $hash, Request $request) { } user_login_finalize($user); - $this->logger->notice('User %name used one-time login link at time %timestamp.', ['%name' => $user->getDisplayName(), '%timestamp' => $timestamp]); + $this->logger->info('User %name used one-time login link at time %timestamp.', ['%name' => $user->getDisplayName(), '%timestamp' => $timestamp]); $this->messenger()->addStatus($this->t('You have just used your one-time login link. It is no longer necessary to use this link to log in. Please set your password.')); // Let the user's password be changed without the current password // check. diff --git a/core/modules/user/src/Form/UserCancelForm.php b/core/modules/user/src/Form/UserCancelForm.php index ef93b269ca8968da6cff17d15db0de791343daaf..787339e07fd51ad03631a4fb82e13a5b2931e322 100644 --- a/core/modules/user/src/Form/UserCancelForm.php +++ b/core/modules/user/src/Form/UserCancelForm.php @@ -150,7 +150,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $this->entity->save(); _user_mail_notify('cancel_confirm', $this->entity); $this->messenger()->addStatus($this->t('A confirmation request to cancel your account has been sent to your email address.')); - $this->logger('user')->notice('Sent account cancellation request to %name %email.', ['%name' => $this->entity->label(), '%email' => '<' . $this->entity->getEmail() . '>']); + $this->logger('user')->info('Sent account cancellation request to %name %email.', ['%name' => $this->entity->label(), '%email' => '<' . $this->entity->getEmail() . '>']); $form_state->setRedirect( 'entity.user.canonical', diff --git a/core/modules/user/src/Form/UserPasswordForm.php b/core/modules/user/src/Form/UserPasswordForm.php index 9a950972bc8782ef7fb3bf722d6f1a83090d18dd..11407bce73ca31c1e25952f75affbff3d174adce 100644 --- a/core/modules/user/src/Form/UserPasswordForm.php +++ b/core/modules/user/src/Form/UserPasswordForm.php @@ -203,7 +203,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $mail = _user_mail_notify('password_reset', $account); if (!empty($mail)) { $this->logger('user') - ->notice('Password reset instructions mailed to %name at %email.', [ + ->info('Password reset instructions mailed to %name at %email.', [ '%name' => $account->getAccountName(), '%email' => $account->getEmail(), ]); @@ -211,7 +211,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { } else { $this->logger('user') - ->notice('Password reset form was submitted with an unknown or inactive account: %name.', [ + ->info('Password reset form was submitted with an unknown or inactive account: %name.', [ '%name' => $form_state->getValue('name'), ]); } diff --git a/core/modules/user/src/RegisterForm.php b/core/modules/user/src/RegisterForm.php index 6ebb4edcdcea1bfa85310424fbf9712ab87c4ae4..aefd7d6be3dbc044958cd96107fd088cf2f4f1c5 100644 --- a/core/modules/user/src/RegisterForm.php +++ b/core/modules/user/src/RegisterForm.php @@ -102,7 +102,7 @@ public function save(array $form, FormStateInterface $form_state) { $form_state->set('user', $account); $form_state->setValue('uid', $account->id()); - $this->logger('user')->notice('New user: %name %email.', ['%name' => $form_state->getValue('name'), '%email' => '<' . $form_state->getValue('mail') . '>', 'type' => $account->toLink($this->t('Edit'), 'edit-form')->toString()]); + $this->logger('user')->info('New user: %name %email.', ['%name' => $form_state->getValue('name'), '%email' => '<' . $form_state->getValue('mail') . '>', 'type' => $account->toLink($this->t('Edit'), 'edit-form')->toString()]); // Add plain text password into user account to generate mail tokens. $account->password = $pass; diff --git a/core/modules/user/src/RoleForm.php b/core/modules/user/src/RoleForm.php index 92a48c90da572895fb41639daf9449bb17598baa..89277c404c6df0ce32aebbe99e615e235d52fc38 100644 --- a/core/modules/user/src/RoleForm.php +++ b/core/modules/user/src/RoleForm.php @@ -58,11 +58,11 @@ public function save(array $form, FormStateInterface $form_state) { $edit_link = $this->entity->toLink($this->t('Edit'), 'edit-form')->toString(); if ($status == SAVED_UPDATED) { $this->messenger()->addStatus($this->t('Role %label has been updated.', ['%label' => $entity->label()])); - $this->logger('user')->notice('Role %label has been updated.', ['%label' => $entity->label(), 'link' => $edit_link]); + $this->logger('user')->info('Role %label has been updated.', ['%label' => $entity->label(), 'link' => $edit_link]); } else { $this->messenger()->addStatus($this->t('Role %label has been added.', ['%label' => $entity->label()])); - $this->logger('user')->notice('Role %label has been added.', ['%label' => $entity->label(), 'link' => $edit_link]); + $this->logger('user')->info('Role %label has been added.', ['%label' => $entity->label(), 'link' => $edit_link]); } $form_state->setRedirect('entity.user_role.collection'); } diff --git a/core/modules/user/user.module b/core/modules/user/user.module index 5923c1c7473e041931caa416b0895ba79be9aace..a43012117700182ae8475909a650b80ea73f8cf4 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -437,7 +437,7 @@ function template_preprocess_username(&$variables) { */ function user_login_finalize(UserInterface $account) { \Drupal::currentUser()->setAccount($account); - \Drupal::logger('user')->notice('Session opened for %name.', ['%name' => $account->getAccountName()]); + \Drupal::logger('user')->info('Session opened for %name.', ['%name' => $account->getAccountName()]); // Update the user table timestamp noting user has logged in. // This is also used to invalidate one-time login links. $account->setLastLoginTime(\Drupal::time()->getRequestTime()); @@ -1197,7 +1197,7 @@ function user_toolbar() { function user_logout() { $user = \Drupal::currentUser(); - \Drupal::logger('user')->notice('Session closed for %name.', ['%name' => $user->getAccountName()]); + \Drupal::logger('user')->info('Session closed for %name.', ['%name' => $user->getAccountName()]); \Drupal::moduleHandler()->invokeAll('user_logout', [$user]);