From 5d28b5de2861657d85703fc0b6cc2005e120b0d7 Mon Sep 17 00:00:00 2001
From: Damien <damien.burel@maarch.org>
Date: Mon, 26 Nov 2018 14:22:01 +0100
Subject: [PATCH] FEAT #8791 Notif user modification + user action

---
 modules/notifications/xml/event_type.xml    | 4 ++--
 src/app/user/controllers/UserController.php | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/notifications/xml/event_type.xml b/modules/notifications/xml/event_type.xml
index 73fd81e7c61..f75c8eb3fe7 100755
--- a/modules/notifications/xml/event_type.xml
+++ b/modules/notifications/xml/event_type.xml
@@ -25,11 +25,11 @@
         <label>Courrier en copie</label>
     </event_type>
     <event_type>
-        <id>usersup</id>
+        <id>userModification</id>
         <label>Modification d'un utilisateur</label>
     </event_type>
     <event_type>
-        <id>users%</id>
+        <id>user%</id>
         <label>Actions sur utilisateur</label>
     </event_type>
     <event_type>
diff --git a/src/app/user/controllers/UserController.php b/src/app/user/controllers/UserController.php
index 6f10d273e65..5b4a3cd4545 100644
--- a/src/app/user/controllers/UserController.php
+++ b/src/app/user/controllers/UserController.php
@@ -215,8 +215,8 @@ class UserController
         HistoryController::add([
             'tableName'    => 'users',
             'recordId'     => $GLOBALS['userId'],
-            'eventType'    => 'ADD',
-            'eventId'      => 'userCreation',
+            'eventType'    => 'UP',
+            'eventId'      => 'userModification',
             'info'         => _USER_UPDATED . " {$data['user_id']}"
         ]);
 
@@ -235,8 +235,8 @@ class UserController
         HistoryController::add([
             'tableName'    => 'users',
             'recordId'     => $GLOBALS['userId'],
-            'eventType'    => 'ADD',
-            'eventId'      => 'userCreation',
+            'eventType'    => 'DEL',
+            'eventId'      => 'userSuppression',
             'info'         => _USER_DELETED . " {$aArgs['id']}"
         ]);
 
-- 
GitLab