aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-11-24 11:23:59 +0100
committerGitHub <noreply@github.com>2021-11-24 11:23:59 +0100
commit70f9e5e37dde34a976d7aab1a9cdeec165cb5df1 (patch)
tree90a70affa2bd7ba65875109c0de3eea68bd636b0
parent99f600270e102706012361c5605629330ad521e6 (diff)
parentbe5b9e36cd533a25029f623a185a4ba84506aad5 (diff)
downloadnextcloud-server-70f9e5e37dde34a976d7aab1a9cdeec165cb5df1.tar.gz
nextcloud-server-70f9e5e37dde34a976d7aab1a9cdeec165cb5df1.zip
Merge pull request #29869 from nextcloud/fix/28139/hide-status-from-public
Hide user status on profile from public
-rw-r--r--core/Controller/ProfilePageController.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/core/Controller/ProfilePageController.php b/core/Controller/ProfilePageController.php
index e4064370d9c..505dfa4e249 100644
--- a/core/Controller/ProfilePageController.php
+++ b/core/Controller/ProfilePageController.php
@@ -127,13 +127,15 @@ class ProfilePageController extends Controller {
}
}
- $userStatuses = $this->userStatusManager->getUserStatuses([$targetUserId]);
- $status = $userStatuses[$targetUserId] ?? null;
- if ($status !== null) {
- $this->initialStateService->provideInitialState('status', [
- 'icon' => $status->getIcon(),
- 'message' => $status->getMessage(),
- ]);
+ if ($visitingUser !== null) {
+ $userStatuses = $this->userStatusManager->getUserStatuses([$targetUserId]);
+ $status = $userStatuses[$targetUserId] ?? null;
+ if ($status !== null) {
+ $this->initialStateService->provideInitialState('status', [
+ 'icon' => $status->getIcon(),
+ 'message' => $status->getMessage(),
+ ]);
+ }
}
$this->initialStateService->provideInitialState(