# Custom badge for trust level 0

**URL:** https://meta.discourse.org/t/custom-badge-for-trust-level-0/290171
**Category:** Data & reporting
**Tags:** trust-levels, sql-triggered-badge
**Created:** [January 1, 2024, 12:10pm UTC](https://meta.discourse.org/t/custom-badge-for-trust-level-0/290171 "2024-01-01T12:10:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Farhan\_Hossen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/farhan_hossen/32/344620_2.png) [@Farhan\_Hossen](https://meta.discourse.org/u/Farhan_Hossen)
#### Post date: [January 1, 2024, 12:10pm UTC](https://meta.discourse.org/t/custom-badge-for-trust-level-0/290171/1 "2024-01-01T12:10:07Z")

</div>

I’m trying to grant a badge to all the new users in my forum. I’m trying the following

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/e/0/0e0bf56832fe01f73849be01f13b2b1d90690076.png)

I see this preview

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/a/c/dac77073e25ac9f46a16639df20cc694c0fb44ca.png)  
But the badge is not assigned  
 ![image](https://global.discourse-cdn.com/meta/original/4X/d/b/b/dbb8ec41572b92a0323ce3f1ce351eafce439195.png)

Oh and I don’t want the badge for users after reaching a higher trust level.  
Any idea please?

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [January 1, 2024, 1:51pm UTC](https://meta.discourse.org/t/custom-badge-for-trust-level-0/290171/2 "2024-01-01T13:51:30Z")

</div>

Badges are granted at a fixed time each day. It looks like there is nothing wrong with your code, then all you have to do is wait for the next day and it will automatically grant.

(Or you can also go to `/sidekiq/scheduler`, find `Jobs::BadgeGrant` and press `trigger`)

---

<div class="post-metadata">

### Author: ![Farhan\_Hossen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/farhan_hossen/32/344620_2.png) [@Farhan\_Hossen](https://meta.discourse.org/u/Farhan_Hossen)
#### Post date: [January 1, 2024, 1:58pm UTC](https://meta.discourse.org/t/custom-badge-for-trust-level-0/290171/3 "2024-01-01T13:58:12Z")

</div>

Thank you so much. It worked. Do you have any suggestions on how can I grant the badge as soon as a user creates an account? I tried to change the trigger to “When a user is edited or created”  
and it worked fine. But I also need to remove the badge when a user reaches trust level 1. Is this something feasible?  
Thank you again.

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [January 1, 2024, 2:02pm UTC](https://meta.discourse.org/t/custom-badge-for-trust-level-0/290171/4 "2024-01-01T14:02:30Z")

</div>

With your current configuration, nothing needs to be done. It will run the task every day and revoke the old badges.  
I haven’t tried yet whether it will be immediately revoked when the user reaches trust level 1.
