From 24213986abaf927c88ce9a71db5c9daee314529d Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 26 Apr 2024 13:23:59 +0200 Subject: [PATCH] Bind uploaded attachments to the current user --- .../lib/system/file/processor/AttachmentFileProcessor.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wcfsetup/install/files/lib/system/file/processor/AttachmentFileProcessor.class.php b/wcfsetup/install/files/lib/system/file/processor/AttachmentFileProcessor.class.php index af6dfd8629..7c90cbee12 100644 --- a/wcfsetup/install/files/lib/system/file/processor/AttachmentFileProcessor.class.php +++ b/wcfsetup/install/files/lib/system/file/processor/AttachmentFileProcessor.class.php @@ -10,6 +10,7 @@ use wcf\data\file\thumbnail\FileThumbnail; use wcf\http\Helper; use wcf\system\attachment\AttachmentHandler; use wcf\system\file\processor\exception\UnexpectedThumbnailIdentifier; +use wcf\system\WCF; use wcf\util\FileUtil; /** @@ -53,6 +54,7 @@ final class AttachmentFileProcessor implements IFileProcessor 'objectID' => $attachmentHandler->getObjectID(), 'tmpHash' => $attachmentHandler->getTmpHashes()[0] ?? '', 'fileID' => $file->fileID, + 'userID' => WCF::getUser()->userID ?: null, ]); } -- 2.20.1