Skip to content

Commit 7edf91b

Browse files
committed
fix(dav): Remove useless null check on displayName
There is already a fallback to uid inside User.php Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent 339d070 commit 7edf91b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

apps/dav/lib/Connector/Sabre/Principal.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,9 @@ protected function userToPrincipal($user, ?array $propertyFilter = null) {
496496
};
497497

498498
$userId = $user->getUID();
499-
$displayName = $user->getDisplayName();
500499
$principal = [
501500
'uri' => $this->principalPrefix . '/' . $userId,
502-
'{DAV:}displayname' => is_null($displayName) ? $userId : $displayName,
501+
'{DAV:}displayname' => $user->getDisplayName(),
503502
'{urn:ietf:params:xml:ns:caldav}calendar-user-type' => 'INDIVIDUAL',
504503
];
505504

0 commit comments

Comments
 (0)