Skip to content

Commit 7412381

Browse files
PVince81come-nc
andauthored
Make psalm happy
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Vincent Petry <vincent@nextcloud.com>
1 parent 141dfc9 commit 7412381

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

apps/provisioning_api/lib/Controller/AUserData.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ protected function getUserData(string $userId, bool $includeScopes = false): arr
114114
}
115115

116116
// Should be at least Admin Or SubAdmin!
117+
if ($currentLoggedInUser === null) {
118+
throw new OCSException('No user logged in');
119+
}
117120
$isAdmin = $this->groupManager->isAdmin($currentLoggedInUser->getUID());
118121
if ($isAdmin
119122
|| $this->groupManager->getSubAdmin()->isUserAccessible($currentLoggedInUser, $targetUserObject)) {

0 commit comments

Comments
 (0)