# "Last Seen" User Card

**URL:** https://meta.discourse.org/t/last-seen-user-card/81375
**Category:** Theme component
**Tags:** user-card
**Created:** [February 24, 2018, 12:58am UTC](https://meta.discourse.org/t/last-seen-user-card/81375 "2018-02-24T00:58:36Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [February 24, 2018, 12:58am UTC](https://meta.discourse.org/t/last-seen-user-card/81375/1 "2018-02-24T00:58:36Z")

</div>

This theme component will allow you to include the “last seen” user statistic in user profile cards.

> **Repo:** [GitHub - tshenry/discourse-last-seen-user-card-theme-component](https://github.com/tshenry/discourse-last-seen-user-card-theme-component)

#### Before

 ![46%20PM](https://global.discourse-cdn.com/meta/original/3X/1/1/11bba0688951e05f95ef1690ab8fe7f34f19ec52.png)

#### After

 ![left-seen](https://global.discourse-cdn.com/meta/original/3X/d/f/df2416a2a16d5b798e9cb557e1097361818dc372.png)

## About

In addition to my own interest in having this stat added to user cards, there’s been some discussion on here that inspired this theme component’s creation:

> [@Add last seen and post count to user card](https://meta.discourse.org/t/add-last-seen-and-post-count-to-user-card/16550):
>
> I think we should expand our user card to include post counts: [image] Additionally maybe consider adding a row for Last Seen - perhaps a separate feature req/ Thoughts?

> [@Replace "last post" with "last seen" in profile card?](https://meta.discourse.org/t/replace-last-post-with-last-seen-in-profile-card/32706):
>
> I think “Last Seen” is a more useful data point than “Last Post”, at least as far as the profile card pop-up is concerned. I propose to swap out “Last Post” for “Last Seen” in the profile card. Take the user @Cafeine for instance (sorry about the unmerited mention mate stuck_out_tongue ) If you find an old discussion with a post of his that you might want to address with a reply or private message, you might think twice when you see his profile: By the looks of it, he hasn’t been…

## Installation

Follow this guide here:

> [@Installing a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682?source_topic_id=77929):
>
> bookmark This is a guide for installing and managing themes and theme components in Discourse. person_raising_hand Required user level: Administrator Installing and customizing themes can significantly improve the look and feel of your Discourse site. You can easily import and manage themes and their components through the Discourse admin panel. This guide covers: Importing new themes and theme components Adding theme components to a theme Managing automatic updates Additional resourc…

Please feel free to post if there are any questions, problems, or suggestions!

---

<div class="post-metadata">

### Author: ![McBlu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcblu/32/91128_2.png) [@McBlu](https://meta.discourse.org/u/McBlu)
#### Post date: [March 15, 2018, 7:44pm UTC](https://meta.discourse.org/t/last-seen-user-card/81375/2 "2018-03-15T19:44:22Z")

</div>

This is fantastic. I will use this function a lot as I assess new members’ engagement and chase particular people down who I work with closely.

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [March 16, 2018, 4:07am UTC](https://meta.discourse.org/t/last-seen-user-card/81375/3 "2018-03-16T04:07:38Z")

</div>

This has had a minor update:

- Reduced the amount of code by switching from a full template override to using the existing plugin outlet to achieve the same positioning.

  
For anyone that uses this or is interested in using it, there are four metadata positions on the user card. Currently, starting from the left it goes last post, date joined, last seen, and time read. Which position would you prefer the "last seen" metadata to be displayed?

_Poll ([view on site](https://meta.discourse.org/t/last-seen-user-card/81375/3))_

I imagine it’s not extremely important to most, but I’m curious if there is a preference that I can consider for a future update.

---

<div class="post-metadata">

### Author: ![McBlu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcblu/32/91128_2.png) [@McBlu](https://meta.discourse.org/u/McBlu)
#### Post date: [March 16, 2018, 4:14am UTC](https://meta.discourse.org/t/last-seen-user-card/81375/4 "2018-03-16T04:14:53Z")

</div>

I don’t mind where it is so long as it is there.

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [March 22, 2018, 9:43am UTC](https://meta.discourse.org/t/last-seen-user-card/81375/5 "2018-03-22T09:43:31Z")

</div>

I’ve update this to position “Last Seen” first in the list. Thanks to all that voiced their opinion 😁

---

<div class="post-metadata">

### Author: ![Anatolia](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anatolia/32/133777_2.png) [@Anatolia](https://meta.discourse.org/u/Anatolia)
#### Post date: [November 24, 2019, 9:47pm UTC](https://meta.discourse.org/t/last-seen-user-card/81375/6 "2019-11-24T21:47:21Z")

</div>

@tshenry Is it compatible with latest Discourse? It’s not working although installed.

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [November 25, 2019, 6:01pm UTC](https://meta.discourse.org/t/last-seen-user-card/81375/7 "2019-11-25T18:01:09Z")

</div>

I just checked and it’s working on the latest tests-passed. Did you make sure to refresh the page after adding the component to your main theme?

---

<div class="post-metadata">

### Author: ![Anatolia](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anatolia/32/133777_2.png) [@Anatolia](https://meta.discourse.org/u/Anatolia)
#### Post date: [November 25, 2019, 7:24pm UTC](https://meta.discourse.org/t/last-seen-user-card/81375/8 "2019-11-25T19:24:34Z")

</div>

Did you check on mobile view as well?

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [November 25, 2019, 9:38pm UTC](https://meta.discourse.org/t/last-seen-user-card/81375/9 "2019-11-25T21:38:49Z")

</div>

Ah, good point! Fun fact - this component was created before mobile user cards existed! Because of that, it was only set up to work on desktop.

I’ve just pushed an update that should support both environments:

[https://github.com/tshenry/discourse-last-seen-user-card-theme-component/commit/fdbdb65320d18ac3b466fb3c81e902add7499e0b](https://github.com/tshenry/discourse-last-seen-user-card-theme-component/commit/fdbdb65320d18ac3b466fb3c81e902add7499e0b)

---

<div class="post-metadata">

### Author: ![Anatolia](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anatolia/32/133777_2.png) [@Anatolia](https://meta.discourse.org/u/Anatolia)
#### Post date: [November 26, 2019, 1:18am UTC](https://meta.discourse.org/t/last-seen-user-card/81375/10 "2019-11-26T01:18:53Z")

</div>

I’ve got the update, thanks.

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [July 26, 2021, 7:04pm UTC](https://meta.discourse.org/t/last-seen-user-card/81375/11 "2021-07-26T19:04:18Z")

</div>

Reviving this one: Just to confirm that it still works like a charm and is super useful!

This makes it super quick easy to check if the user is in fact still an active member. Before I always had to open full profile to decide if it’s worth the time so send a private message to the user.

Would love to see that in core!

---

<div class="post-metadata">

### Author: ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)
#### Post date: [February 4, 2023, 6:57pm UTC](https://meta.discourse.org/t/last-seen-user-card/81375/12 "2023-02-04T18:57:41Z")

</div>

> [@jrgong](#):
>
> Would love to see that in core!

Yes!! Should definitely be in core IMO. Until then thanks very much to @tshenry!

---

<div class="post-metadata">

### Author: ![Roi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roi/32/130587_2.png) [@Roi](https://meta.discourse.org/u/Roi)
#### Post date: [August 7, 2024, 3:47pm UTC](https://meta.discourse.org/t/last-seen-user-card/81375/13 "2024-08-07T15:47:51Z")

</div>

I noticed since my last Discourse update that the Last Seen text in the user card is much bigger than the rest and also bold. I checked and it is wrapped in `<h3>` so I undid this by putting

```plaintext
#user-card .last-seen-metadata h3 {
    font-size: unset;
    font-weight: unset;
}

```

in the theme css.

No idea if this is an intended effect, so I wanted to share my experience.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [August 7, 2024, 4:03pm UTC](https://meta.discourse.org/t/last-seen-user-card/81375/14 "2024-08-07T16:03:47Z")

</div>

Probably not.

> [@Solutions and cheers appear quite large on user cards](https://meta.discourse.org/t/solutions-and-cheers-appear-quite-large-on-user-cards/316675/7):
>
> I’ve got some follow-up fixes for these in: [A11Y: remove heading tag from usercard stat by awesomerobot · Pull Request #299 · discourse/discourse-solved · GitHub](https://github.com/discourse/discourse-solved/pull/299)[A11Y: remove heading tag from usercard stat by awesomerobot · Pull Request #148 · discourse/discourse-gamification · GitHub](https://github.com/discourse/discourse-gamification/pull/148)[A11Y: remove heading tag from usercard stat by awesomerobot · Pull Request #117 · discourse/discourse-follow · GitHub](https://github.com/discourse/discourse-follow/pull/117)

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [August 7, 2024, 5:45pm UTC](https://meta.discourse.org/t/last-seen-user-card/81375/15 "2024-08-07T17:45:26Z")

</div>

I’ve added a pull request for the component here to remove the heading tag to match the Discourse change:

[https://github.com/tshenry/discourse-last-seen-user-card-theme-component/pull/2](https://github.com/tshenry/discourse-last-seen-user-card-theme-component/pull/2)

---

<div class="post-metadata">

### Author: ![Roi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roi/32/130587_2.png) [@Roi](https://meta.discourse.org/u/Roi)
#### Post date: [August 7, 2024, 8:52pm UTC](https://meta.discourse.org/t/last-seen-user-card/81375/16 "2024-08-07T20:52:53Z")

</div>

> [@Moin](#):
>
> Probably not

> [@awesomerobot](#):
>
> I’ve added a pull request

Thank you very much for explanation and also for the PR! 🙂

---

<div class="post-metadata">

### Author: ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)
#### Post date: [August 9, 2024, 2:01am UTC](https://meta.discourse.org/t/last-seen-user-card/81375/17 "2024-08-09T02:01:01Z")

</div>

Thanks very much for this fix! Will it make it into the 3.3.x `stable` branch?

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [August 9, 2024, 2:38am UTC](https://meta.discourse.org/t/last-seen-user-card/81375/18 "2024-08-09T02:38:07Z")

</div>

Theme component updates are completely separate from core updates, you can update them at any time from the admin UI regardless of the core updates.

---

<div class="post-metadata">

### Author: ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)
#### Post date: [August 9, 2024, 1:21pm UTC](https://meta.discourse.org/t/last-seen-user-card/81375/19 "2024-08-09T13:21:13Z")

</div>

Oops, sorry, I forgot that this is a theme component and not part of core.

---

<div class="post-metadata">

### Author: ![Zomb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zomb/32/93881_2.png) [@Zomb](https://meta.discourse.org/u/Zomb)
#### Post date: [November 10, 2024, 4:03am UTC](https://meta.discourse.org/t/last-seen-user-card/81375/20 "2024-11-10T04:03:55Z")

</div>

Works great, but for some reason it’s showing last in the list (after cheers) for me.

 ![Screenshot 2024-11-09 at 11.03.43 PM](https://global.discourse-cdn.com/meta/original/4X/1/4/5/145105f878a9ef91a333f848d04f88aef906c5d3.png)

[Next page](https://meta.discourse.org/t/last-seen-user-card/81375.md?page=2)
