From 1cd0f8a397ce0a5b375928ae7f6e364ce67ef6fd Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 8 Feb 2015 12:29:06 +0100 Subject: [PATCH] Fixed incorrect author provided Closes #1873 --- .../lib/action/NotificationConfirmAction.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/action/NotificationConfirmAction.class.php b/wcfsetup/install/files/lib/action/NotificationConfirmAction.class.php index fa30f9b9f7..4dfc09be16 100644 --- a/wcfsetup/install/files/lib/action/NotificationConfirmAction.class.php +++ b/wcfsetup/install/files/lib/action/NotificationConfirmAction.class.php @@ -71,12 +71,20 @@ class NotificationConfirmAction extends AbstractAction { $objectType = ObjectTypeCache::getInstance()->getObjectType($event->objectTypeID); $objects = $objectType->getProcessor()->getObjectsByIDs(array($this->notification->objectID)); + $userProfile = null; + if ($this->notification->authorID) { + $userProfile = new UserProfile(new User($this->notification->authorID)); + } + else { + $userProfile = new UserProfile(new User(null, array('userID' => null, 'username' => WCF::getLanguage()->get('wcf.user.guest')))); + } + $className = $event->className; $notificationEvent = new $className($event); $notificationEvent->setObject( $this->notification, $objects[$this->notification->objectID], - $unknownAuthor = new UserProfile(new User(null, array('userID' => null, 'username' => WCF::getLanguage()->get('wcf.user.guest')))), + $userProfile, $this->notification->additionalData ); -- 2.20.1