diff --git a/role_watchdog.module b/role_watchdog.module index 1fd64ca..4b3c9ca 100755 --- a/role_watchdog.module +++ b/role_watchdog.module @@ -58,7 +58,7 @@ function role_watchdog_user_update(EntityInterface $account) { function role_watchdog_user_insert(EntityInterface $account) { $uid = \Drupal::currentUser()->id(); - role_watchdog_save_entity('Role added', $uid, + role_watchdog_save_entity('Roles added', $uid, RoleWatchdog::ROLE_ADDED, $account->id(), $account->getRoles()); if(\Drupal::config('role_watchdog.settings')->get('role_watchdog_notify_email') != '') { role_watchdog_notify('Roles Added', $account->getRoles(), $account->id()); @@ -127,7 +127,7 @@ function role_watchdog_notify($role_message, $roles_changed, $account_id) { $notification_roles = array_intersect(array_keys($role_watchdog_monitor_roles), $roles_changed); $mail_manager = \Drupal::service('plugin.manager.mail'); $langcode = \Drupal::currentUser()->getPreferredLangcode(); - $params['message'] = t("Role changed for User ID @account_id. @role_message : @roles_changed", ['@account_id' => $account_id, '@role_message' => $role_message, '@roles_changed' => implode(',', $roles_changed)]); + $params['message'] = t("Roles changed for User ID @account_id. @role_message : @roles_changed", ['@account_id' => $account_id, '@role_message' => $role_message, '@roles_changed' => implode(',', $roles_changed)]); $notify = $mail_manager->mail('role_watchdog', 'notification', $role_watchdog_config->get('role_watchdog_notify_email'), $langcode, $params, NULL, 'TRUE'); if($notify['result'] !== TRUE ) { \Drupal::logger('role_watchdog')->notice('Error sending notification email for Role Watchdog.');