Merge pull request #39435 from nextcloud/backport/39309/stable27

[stable27] fix(profile): fix getUID on nullable user variable
This commit is contained in:
Arthur Schiwon 2023-08-02 20:54:09 +02:00 committed by GitHub
commit a0750349fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}
}