# Is it possible to display only one trust level badge on the user card?

**URL:** <https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714>\
**Category:** Product Support\
**Created:** [4월 17, 2015, 9:33오후 UTC](https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714 "2015-04-17T21:33:13Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![LeoMcA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leomca/32/87233_2.png) [@LeoMcA](https://meta.discourse.org/u/LeoMcA)\
**Post date:** [10월 27, 2016, 2:49오후 UTC](https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714/8 "2016-10-27T14:49:20Z")

</div>

I’ve implemented this, and [submitted a PR](https://github.com/discourse/discourse/pull/4519).

Before:

 ![](https://global.discourse-cdn.com/meta/original/3X/9/3/9364ed10c1af85f882f47f290029701521b60fa1.png)

After:

 ![](https://global.discourse-cdn.com/meta/original/3X/9/6/96b544c61a95f0c8004417ef345ad647ee656330.png)

The one thing I wasn’t sure about is what to do when users _just_ have trust level badges, currently the following will happen:

 ![](https://global.discourse-cdn.com/meta/original/3X/2/7/2725bba6f982aa69d49a57698da0ac4af4486af3.png)

I think it would make sense to make use of the space and display the rest of the trust level badges in a situation like this. However, I expect this is an incredibly rare occurrence (only found when a user has been granted trust levels rather then earned them), and I wonder if it’s therefore worth the added code complexity.

Speaking of code complexity, I spent a while staring at my screen trying to work out if I could make the `featured_user_badges` query more efficient, but didn’t come up with anything. We end up running the same subquery twice (to find the highest trust level badge a user has) and from what I can tell ActiveRecord doesn’t support `WITH` queries (which, if my understanding is correct, would mean the duplicated subquery is only ran once). I’m not sure how much of a performance impact this is, though. Again - some advice would be very welcome here.

---

_[View the full topic](https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714)._
