From: Alexander Ebert Date: Sun, 8 Feb 2015 11:29:06 +0000 (+0100) Subject: Fixed incorrect author provided X-Git-Tag: 2.1.0_RC_1~55 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1cd0f8a397ce0a5b375928ae7f6e364ce67ef6fd;p=GitHub%2FWoltLab%2FWCF.git Fixed incorrect author provided Closes #1873 --- 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 );