Skip to content

Commit

Permalink
chore: Remove compatibility check for display name
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Apr 2, 2024
1 parent 3dff56b commit f5ab88b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/Service/LockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f5ab88b

Please sign in to comment.