summaryrefslogtreecommitdiffstats
path: root/lib/private
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-08-28 13:50:27 +0000
commit6076e7b8ce0cd47411b63f1b61192df1d42ba6f2 (patch)
tree0b780fe5d7b907b101a152876d921e5c18055f1f /lib/private
parenteb61f94807dd48244fd35374d8ccf34c31b9e8da (diff)
downloadnextcloud-server-6076e7b8ce0cd47411b63f1b61192df1d42ba6f2.tar.gz
nextcloud-server-6076e7b8ce0cd47411b63f1b61192df1d42ba6f2.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/private')
-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 b03d304aa1e..c7d09a3d6f7 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -1568,7 +1568,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'));
}
}