Merge pull request #39309 from nextcloud/bug/35766/fix-get-uid-on-nullable

fix(profile): fix getUID on nullable user variable
This commit is contained in:
Côme Chilliet 2023-07-17 14:45:00 +02:00 committed by GitHub
commit de4c2196a1
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;
}
}