Merge pull request #41251 from nextcloud/fix/profile-active

fix: Only highlight profile entry when viewing own profile
This commit is contained in:
Pytal 2023-11-06 09:25:16 -08:00 committed by GitHub
commit 045e1528bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,7 +106,9 @@ class ProfilePageController extends Controller {
$this->profileManager->getProfileFields($targetUser, $visitingUser),
);
$this->navigationManager->setActiveEntry('profile');
if ($targetUser === $visitingUser) {
$this->navigationManager->setActiveEntry('profile');
}
$this->eventDispatcher->dispatchTyped(new BeforeTemplateRenderedEvent($targetUserId));