diff options
author | Christopher Ng <chrng8@gmail.com> | 2021-11-23 22:58:44 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2021-11-23 22:58:44 +0000 |
commit | be5b9e36cd533a25029f623a185a4ba84506aad5 (patch) | |
tree | 166981c64acd7052e8ac90f74a9bde72bfc8ee50 /core/Controller | |
parent | fd487c1a43874bf7eaeebe2ff822e18978b6d1e1 (diff) | |
download | nextcloud-server-be5b9e36cd533a25029f623a185a4ba84506aad5.tar.gz nextcloud-server-be5b9e36cd533a25029f623a185a4ba84506aad5.zip |
Hide user status from public
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'core/Controller')
-rw-r--r-- | core/Controller/ProfilePageController.php | 16 |
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( |