# Redirect on click user avatar and username to user profile page /u/username/summary

**URL:** https://meta.discourse.org/t/redirect-on-click-user-avatar-and-username-to-user-profile-page-u-username-summary/263403
**Category:** Development
**Created:** [May 1, 2023, 3:56pm UTC](https://meta.discourse.org/t/redirect-on-click-user-avatar-and-username-to-user-profile-page-u-username-summary/263403 "2023-05-01T15:56:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Anil\_Tako](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anil_tako/32/295942_2.png) [@Anil\_Tako](https://meta.discourse.org/u/Anil_Tako)
#### Post date: [May 1, 2023, 3:56pm UTC](https://meta.discourse.org/t/redirect-on-click-user-avatar-and-username-to-user-profile-page-u-username-summary/263403/1 "2023-05-01T15:56:51Z")

</div>

How to redirect to user profile page i.e. u/username/summary when click on avatar and username instead of opening popup of user card?

 ![redirect-profile](https://global.discourse-cdn.com/meta/original/4X/c/4/9/c49fc56b90a32623da03728d656c0296933c3121.png)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [May 2, 2023, 6:04am UTC](https://meta.discourse.org/t/redirect-on-click-user-avatar-and-username-to-user-profile-page-u-username-summary/263403/10 "2023-05-02T06:04:10Z")

</div>

Dev is not my strong suit, but I’ve asked the clever people and I believe something like this should be what you’re looking for: 👍🙂

```js
 api.modifyClass("component:user-card-contents", {
    pluginId: "your-plugin-id",
    _show(_, target) {
      DiscourseURL.routeTo(`${target.href}/summary`);
      return false;
    },
  });

```

---

<div class="post-metadata">

### Author: ![Anil\_Tako](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anil_tako/32/295942_2.png) [@Anil\_Tako](https://meta.discourse.org/u/Anil_Tako)
#### Post date: [May 2, 2023, 6:18am UTC](https://meta.discourse.org/t/redirect-on-click-user-avatar-and-username-to-user-profile-page-u-username-summary/263403/11 "2023-05-02T06:18:28Z")

</div>

Thanks! It solved the problem.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [June 1, 2023, 6:18am UTC](https://meta.discourse.org/t/redirect-on-click-user-avatar-and-username-to-user-profile-page-u-username-summary/263403/12 "2023-06-01T06:18:54Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
