Use nullsafe call syntax instead of additionnal check

Co-authored-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
pull/43748/head
Côme Chilliet 10 months ago committed by backportbot[bot]
parent da391a550f
commit 92862be923

@ -1565,7 +1565,7 @@ class Manager implements IManager {
$uids = array_unique([$share->getShareOwner(),$share->getSharedBy()]);
foreach ($uids as $uid) {
$user = $this->userManager->get($uid);
if (($user !== null) && !$user->isEnabled()) {
if ($user?->isEnabled() === false) {
throw new ShareNotFound($this->l->t('The requested share comes from a disabled user'));
}
}

Loading…
Cancel
Save