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(); }