0012854: logger user is always setupuser with ldap user backend
authorPhilipp Schüle <p.schuele@metaways.de>
Fri, 24 Mar 2017 11:28:46 +0000 (12:28 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 27 Mar 2017 08:43:13 +0000 (10:43 +0200)
https://forge.tine20.org/view.php?id=12854

Change-Id: I3f77253f326be42403d623dd9532afe476e6cfb0
Reviewed-on: http://gerrit.tine20.com/customers/4414
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Core.php
tine20/Tinebase/Log/Formatter.php

index e6c1cb9..1271374 100644 (file)
@@ -1245,6 +1245,7 @@ class Tinebase_Core
                 }
                 
                 Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__ . ' Setting user ' . $userString);
+                Tinebase_Log_Formatter::resetUsername();
             }
         }
         
index 0c504c7..2d3392b 100644 (file)
@@ -86,7 +86,7 @@ class Tinebase_Log_Formatter extends Zend_Log_Formatter_Simple
      *
      * @param string $format
      */
-    function __construct(string $format = null)
+    public function __construct($format = null)
     {
         parent::__construct($format);
         
@@ -183,6 +183,17 @@ class Tinebase_Log_Formatter extends Zend_Log_Formatter_Simple
         
         return (self::$_username) ? self::$_username : '-- none --';
     }
+
+    /**
+     * reset current username
+     *
+     * @return string
+     */
+    public static function resetUsername()
+    {
+        self::$_username = NULL;
+    }
+
     
     /**
      * set/append prefix