diff --git a/lib/Service/LockService.php b/lib/Service/LockService.php index 9b657b96..b730a632 100644 --- a/lib/Service/LockService.php +++ b/lib/Service/LockService.php @@ -344,13 +344,7 @@ public function injectMetadata(FileLock $lock): FileLock { $displayName = $this->getAppName($lock->getOwner()) ?? null; } if ($lock->getType() === ILock::TYPE_TOKEN) { - if (!method_exists($this->userManager, 'getDisplayName')) { - // TODO: Remove once 25 is the minimum supported version - $user = $this->userManager->get($lock->getOwner()); - $displayName = $user ? $user->getDisplayName(): $lock->getDisplayName(); - } else { - $displayName = $this->userManager->getDisplayName($lock->getOwner()) ?? $lock->getDisplayName(); - } + $displayName = $this->userManager->getDisplayName($lock->getOwner()) ?? $lock->getDisplayName(); } if ($displayName) {