Fixed modification log issue
authorMarcel Werk <burntime@woltlab.com>
Tue, 22 Apr 2014 22:08:23 +0000 (00:08 +0200)
committerMarcel Werk <burntime@woltlab.com>
Tue, 22 Apr 2014 22:08:23 +0000 (00:08 +0200)
wcfsetup/install/files/lib/system/log/modification/ModificationLogHandler.class.php

index 47a1bb08c92d24fc244fbb0afb2705463e67d016..5cc4b1ac0956f33136b8146bf95f2f8b932e2492 100644 (file)
@@ -65,7 +65,14 @@ class ModificationLogHandler extends SingletonFactory {
                        throw new SystemException("Object type '".$objectType."' not found within definition 'com.woltlab.wcf.modifiableContent'");
                }
                
-               if ($userID === null) $userID = WCF::getUser()->userID;
+               if ($userID === null) {
+                       if (WCF::getUser()->userID) {
+                               $userID = WCF::getUser()->userID;
+                       }
+                       else if ($username === null) {
+                               $username = 'System';
+                       }
+               }
                if ($username === null) {
                        if (WCF::getUser()->username) $username = WCF::getUser()->username;
                        else $username = '';