From f3dadaaa3d3d564c8cfd85b3f819398bb7ebbe47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.bernigaud@opensides.be>
Date: Fri, 3 Jun 2016 08:56:51 +0200
Subject: [PATCH] Fixes #4774 Fixed objectType name + avoid infinite looping

---
 include/class_logging.inc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/class_logging.inc b/include/class_logging.inc
index 1e0b4343a..ae0db1e65 100644
--- a/include/class_logging.inc
+++ b/include/class_logging.inc
@@ -132,7 +132,10 @@ class logging {
    */
   static protected function log_into_ldap($entry)
   {
-    $tabObject = objects::create('auditAction');
+    if ($entry['objecttype'] == 'plugin/auditEvent') {
+      return; // Avoid infinite loop
+    }
+    $tabObject = objects::create('auditEvent');
     $baseObject = $tabObject->getBaseObject();
     $baseObject->fdAuditDateTime    = $entry['timestamp'];
     $baseObject->fdAuditAction      = $entry['action'];
-- 
GitLab