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:24:08 +0000 |
commit | 56899c1a837cc194d3f156647f0fa49cc63e26d7 (patch) | |
tree | 9eefa141b34bd0f189b1a5a90df7b8e82d3b8ee8 /lib | |
parent | 9fbe9791791059eae056932e4acf0bf818ccb203 (diff) | |
download | nextcloud-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.php | 2 |
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; } } |