# User Reputation Next To Username (Junior Member, Senior Member, etc)

**URL:** https://meta.discourse.org/t/user-reputation-next-to-username-junior-member-senior-member-etc/45101
**Category:** Development
**Created:** [Junho 1, 2016, 7:45pm UTC](https://meta.discourse.org/t/user-reputation-next-to-username-junior-member-senior-member-etc/45101 "2016-06-01T19:45:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![P16](https://avatars.discourse-cdn.com/v4/letter/p/b19c9b/32.png) [@P16](https://meta.discourse.org/u/P16)
#### Post date: [Junho 1, 2016, 7:45pm UTC](https://meta.discourse.org/t/user-reputation-next-to-username-junior-member-senior-member-etc/45101/1 "2016-06-01T19:45:59Z")

</div>

Hi Everyone,

We were trying to build a plugin which would show the trust level of the user next to their name within topics. So that all users have a sort of reputation badge next to their name.

Since there is already the title field available which lets the user select the badge, one solution would be to select an option by default (and the highest ranked badge if there is more than one option).

So a basic member would have the title selected by default and have a ‘basic’ next to their username. Which brings me to my questions:

1. How can I expose the `trust_level` attribute of a `user` to the attributes in the `post` widget?

2. Can I programmatically set a title field based off the trust level?

Thanks!

---

<div class="post-metadata">

### Author: ![P16](https://avatars.discourse-cdn.com/v4/letter/p/b19c9b/32.png) [@P16](https://meta.discourse.org/u/P16)
#### Post date: [Junho 2, 2016, 10:06am UTC](https://meta.discourse.org/t/user-reputation-next-to-username-junior-member-senior-member-etc/45101/2 "2016-06-02T10:06:19Z")

</div>

The Custom Groups have a setting which allows us to automatically add users who register with an email from a domain name that you can specify as an admin. Since many don’t use this setting, I wanted to add a plugin that uses this job to instead sync the group with a related trust level group. For example, the ‘Basic’ group would check for users from the ‘trust\_level\_1’ group.

Having groups synced like this would allow us to set them as primary, which would let the users be styled within topics (Senior Member, Junior Member, etc). Are we approaching this the right way?

The code is at:

> <https://github.com/discourse/discourse/blob/9d8db11cf3162241d9828b8fd48cce96854f8863/app/jobs/regular/automatic_group_membership.rb>

---

<div class="post-metadata">

### Author: ![SMT](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@SMT](https://meta.discourse.org/u/SMT)
#### Post date: [Junho 2, 2016, 11:05am UTC](https://meta.discourse.org/t/user-reputation-next-to-username-junior-member-senior-member-etc/45101/3 "2016-06-02T11:05:30Z")

</div>

This is much required. On every post we can show the trust level or reputation of the user. This is very helpful to improve engagement on the forum as most of all other forum have this system.

I would be first to install your plugin. Keep up the good work.

---

<div class="post-metadata">

### Author: ![P16](https://avatars.discourse-cdn.com/v4/letter/p/b19c9b/32.png) [@P16](https://meta.discourse.org/u/P16)
#### Post date: [Junho 5, 2016, 4:19pm UTC](https://meta.discourse.org/t/user-reputation-next-to-username-junior-member-senior-member-etc/45101/4 "2016-06-05T16:19:13Z")

</div>

Plugin created - See:

> [@User Reputation Badge Plugin](https://meta.discourse.org/t/user-reputation-badge-plugin/45282/1):
>
> Finally ready with the User Reputation Badge plugin, as [discussed here](https://meta.discourse.org/t/user-reputation-next-to-username-junior-member-senior-member-etc/45101). What this badge will do is allow users to have a small custom badge/text next to their name (Junior Member, Senior Member, etc). Something like this: As shown above, the user (with trust level 4) has a badge/title next to their name. This can be styled as you wish. This is accomplished by creating five groups and syncing them with the automatic trust level groups. Once users are put into custom groups based on th…
