Merge pull request #39438 from nextcloud/backport/39309/stable25

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

View file

@ -168,7 +168,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;
}
}