From 2eca9ccf222f4cd9aaf8c2fc74c2c62529487e09 Mon Sep 17 00:00:00 2001 From: Julius Knorr Date: Thu, 5 Dec 2024 14:17:03 +0100 Subject: [PATCH] fix: Use proper user when unlocking an app locked file with occ Signed-off-by: Julius Knorr --- lib/Service/LockService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Service/LockService.php b/lib/Service/LockService.php index 01f6cfb7..ac806c9c 100644 --- a/lib/Service/LockService.php +++ b/lib/Service/LockService.php @@ -259,7 +259,7 @@ public function unlockFile(int $fileId, string $userId, bool $force = false, int } if ($force) { - $userId = $lock->getOwner(); + $userId = in_array($lock->getType(), [ILock::TYPE_USER, ILock::TYPE_TOKEN]) ? $lock->getOwner() : $userId; $lockType = $lock->getType(); }