From d0a6680ceff8786efa2ec386283a12d886f2c329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 24 Mar 2022 14:16:12 +0100 Subject: [PATCH] Stick to the actual user id when available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Controller/WopiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php index 7d5fb59c87..dd4fed59b5 100644 --- a/lib/Controller/WopiController.php +++ b/lib/Controller/WopiController.php @@ -203,7 +203,7 @@ public function checkFileInfo(string $fileId, string $access_token): JSONRespons 'BaseFileName' => $file->getName(), 'Size' => $file->getSize(), 'Version' => $version, - 'UserId' => !$wopi->isGuest() ? $wopi->getEditorUid() : $guestUserId, + 'UserId' => !empty($wopi->getEditorUid()) ? $wopi->getEditorUid() : $guestUserId, 'OwnerId' => $wopi->getOwnerUid(), 'UserFriendlyName' => $userDisplayName, 'UserExtraInfo' => [],