summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>2023-08-10 17:05:19 +0200
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2023-09-18 10:38:23 +0000
commit49d52dd33a2582035398070d0dc0c7e70bb435f6 (patch)
tree9d2ed1b90709880f6205a92db4f09ca5bf855161 /lib
parent90a14dbdb347a6025801933ccb586359d707c3b2 (diff)
downloadnextcloud-server-49d52dd33a2582035398070d0dc0c7e70bb435f6.tar.gz
nextcloud-server-49d52dd33a2582035398070d0dc0c7e70bb435f6.zip
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/Manager.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 9ed3ef46c97..0b2fe03b5b8 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -1563,7 +1563,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'));
}
}