Skip to content

Commit

Permalink
Merge pull request #41251 from nextcloud/fix/profile-active
Browse files Browse the repository at this point in the history
fix: Only highlight profile entry when viewing own profile
  • Loading branch information
Pytal authored Nov 6, 2023
2 parents f412c8d + 7f530d2 commit 045e152
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/Controller/ProfilePageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit 045e152

Please sign in to comment.