From 7f530d22e14fbaa86141c875cdad094225f513b7 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Thu, 2 Nov 2023 15:43:56 -0700 Subject: [PATCH] fix: Only highlight profile entry when viewing own profile Signed-off-by: Christopher Ng --- core/Controller/ProfilePageController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/Controller/ProfilePageController.php b/core/Controller/ProfilePageController.php index f8d9053edfadc..e32f54a8ff7cb 100644 --- a/core/Controller/ProfilePageController.php +++ b/core/Controller/ProfilePageController.php @@ -106,7 +106,9 @@ public function index(string $targetUserId): TemplateResponse { $this->profileManager->getProfileFields($targetUser, $visitingUser), ); - $this->navigationManager->setActiveEntry('profile'); + if ($targetUser === $visitingUser) { + $this->navigationManager->setActiveEntry('profile'); + } $this->eventDispatcher->dispatchTyped(new BeforeTemplateRenderedEvent($targetUserId));