summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2023-07-11 14:40:47 +0200
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2023-07-17 13:24:08 +0000
commit56899c1a837cc194d3f156647f0fa49cc63e26d7 (patch)
tree9eefa141b34bd0f189b1a5a90df7b8e82d3b8ee8 /lib
parent9fbe9791791059eae056932e4acf0bf818ccb203 (diff)
downloadnextcloud-server-56899c1a837cc194d3f156647f0fa49cc63e26d7.tar.gz
nextcloud-server-56899c1a837cc194d3f156647f0fa49cc63e26d7.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.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Profile/ProfileManager.php b/lib/private/Profile/ProfileManager.php
index 8de48994ff7..f20ae74768e 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;
}
}