Bind uploaded attachments to the current user
authorAlexander Ebert <ebert@woltlab.com>
Fri, 26 Apr 2024 11:23:59 +0000 (13:23 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 8 Jun 2024 10:19:38 +0000 (12:19 +0200)
wcfsetup/install/files/lib/system/file/processor/AttachmentFileProcessor.class.php

index af6dfd8629106bc8ad61bf27bd19dcdff146cb61..7c90cbee12c2dcb7903ad059126e01d11cec6f3a 100644 (file)
@@ -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,
         ]);
     }