Skip to content

Commit

Permalink
Merge pull request #39309 from nextcloud/bug/35766/fix-get-uid-on-nul…
Browse files Browse the repository at this point in the history
…lable

fix(profile): fix getUID on nullable user variable
  • Loading branch information
come-nc authored Jul 17, 2023
2 parents 911450b + cd9dac1 commit de4c219
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Profile/ProfileManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ private function registerAction(ILinkAction $action, IUser $targetUser, ?IUser $
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;
}
}
Expand Down

0 comments on commit de4c219

Please sign in to comment.