diff options
author | Thomas Citharel <tcit@tcit.fr> | 2023-07-11 14:40:47 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2023-07-11 14:41:58 +0200 |
commit | cd9dac1d203cdd2a545207e59fdb27883416446c (patch) | |
tree | 15412743a030eda12a7b751d5931121d694a4468 /lib/private/Profile/ProfileManager.php | |
parent | 5c6ed30369f5c4edcf46e5e882c6096a7e3cd01e (diff) | |
download | nextcloud-server-cd9dac1d203cdd2a545207e59fdb27883416446c.tar.gz nextcloud-server-cd9dac1d203cdd2a545207e59fdb27883416446c.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/private/Profile/ProfileManager.php')
-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; } } |