diff options
author | Thomas Citharel <tcit@tcit.fr> | 2023-07-11 14:40:47 +0200 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2023-07-17 13:33:58 +0000 |
commit | 5a6447645aeccffcef03afeb9814ad8d569ba287 (patch) | |
tree | f9a9fb6da1aa8ac5e04919a1515445b4baf6139c /lib | |
parent | 70db98feee3a466b5cee2229712d5ac01ea5dfa4 (diff) | |
download | nextcloud-server-5a6447645aeccffcef03afeb9814ad8d569ba287.tar.gz nextcloud-server-5a6447645aeccffcef03afeb9814ad8d569ba287.zip |
fix(profile): fix getUID on nullable user variable
As per method signature, $visitingUser is nullable, so we can't be sure calling getUid() on it will
work.
Closes #35766
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Profile/ProfileManager.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Profile/ProfileManager.php b/lib/private/Profile/ProfileManager.php index ddc0670604b..8a0152bcf71 100644 --- a/lib/private/Profile/ProfileManager.php +++ b/lib/private/Profile/ProfileManager.php @@ -169,7 +169,7 @@ class ProfileManager { return; } if (!$this->appManager->isEnabledForUser($action->getAppId(), $visitingUser)) { - $this->logger->notice('App: ' . $action->getAppId() . ' cannot register actions as it is not enabled for the visiting user: ' . $visitingUser->getUID()); + $this->logger->notice('App: ' . $action->getAppId() . ' cannot register actions as it is not enabled for the visiting user: ' . ($visitingUser ? $visitingUser->getUID() : '(user not connected)')); return; } } |