From da83d14ce8b6d04dd68af591e24b1fb36a0889ae Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 23 Apr 2014 00:08:23 +0200 Subject: [PATCH] Fixed modification log issue --- .../log/modification/ModificationLogHandler.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/log/modification/ModificationLogHandler.class.php b/wcfsetup/install/files/lib/system/log/modification/ModificationLogHandler.class.php index 47a1bb08c9..5cc4b1ac09 100644 --- a/wcfsetup/install/files/lib/system/log/modification/ModificationLogHandler.class.php +++ b/wcfsetup/install/files/lib/system/log/modification/ModificationLogHandler.class.php @@ -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 = ''; -- 2.20.1