# User trust level resets to zero when unlocked

**URL:** <https://meta.discourse.org/t/user-trust-level-resets-to-zero-when-unlocked/255444>\
**Category:** Bug\
**Created:** [February 17, 2023, 7:00am UTC](https://meta.discourse.org/t/user-trust-level-resets-to-zero-when-unlocked/255444 "2023-02-17T07:00:10Z")\
**Posts on this page:** 7\
**Page:** 1

## AI-generated summary

A bug has been reported where a user's trust level resets to zero when unlocked, despite not affecting their actual abilities on the forum. [ljpp](/t/-/255444/1) initially encountered the issue, which was later reproduced by [Canapin](/t/-/255444/3). After investigation, [Canapin](/t/-/255444/5) found that the trust level is set to zero in the database, but doesn't affect the user's experience until they perform an action, which then corrects the trust level. [sam](/t/-/255444/8) believes to have fixed the issue with a [pull request](https://github.com/discourse/discourse/pull/20492), which has not yet been merged.

<div class="post-metadata">

**Author:** ![ljpp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ljpp/32/96506_2.png) [@ljpp](https://meta.discourse.org/u/ljpp)\
**Post date:** [February 17, 2023, 7:00am UTC](https://meta.discourse.org/t/user-trust-level-resets-to-zero-when-unlocked/255444/1 "2023-02-17T07:00:10Z")

</div>

1. This user was locked to TL3 for quite some time.
2. Now he got a few flags due to bad behavior, thus I unlocked the TL
3. The TL goes down to zero and not to the expected TL2.

Latest Discourse version on CDCK SaaS.

 ![Screenshot_20230217_085810_Chrome](https://global.discourse-cdn.com/meta/original/4X/3/4/2/342b2ce88c89a58dc5350c1c87a89af4e9374fc3.jpeg)

---

<div class="post-metadata">

**Author:** ![ljpp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ljpp/32/96506_2.png) [@ljpp](https://meta.discourse.org/u/ljpp)\
**Post date:** [February 17, 2023, 7:21am UTC](https://meta.discourse.org/t/user-trust-level-resets-to-zero-when-unlocked/255444/2 "2023-02-17T07:21:21Z")

</div>

Update:

Apparently this is just a minor UI glitch. A few minutes later the TL was automatically adjusted to the expected level TL2.

---

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [February 20, 2023, 7:12pm UTC](https://meta.discourse.org/t/user-trust-level-resets-to-zero-when-unlocked/255444/3 "2023-02-20T19:12:10Z")

</div>

I can repro the issue.

1. Lock a user trust level (needs to be higher than 0)

2. Unlock its trust level

3. Trust level is displayed at 0.

If I display the user trust level using the API, it returns 0.

However, the user is able to do actions that are allowed only for trust level 1, like sending a personal message. It seems that triggering such an action then re-enables the right trust level for the user.

It’s a bit weird, I’ll dig a bit more.

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [February 20, 2023, 8:34pm UTC](https://meta.discourse.org/t/user-trust-level-resets-to-zero-when-unlocked/255444/4 "2023-02-20T20:34:37Z")

</div>

Me too. It happened when I cleaned my TL3s and unlocking dropped them to TL0.

---

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [February 20, 2023, 9:06pm UTC](https://meta.discourse.org/t/user-trust-level-resets-to-zero-when-unlocked/255444/5 "2023-02-20T21:06:04Z")

</div>

I’ve investigated the issue.

The trust level is indeed set to 0, even in the database, but it strangely doesn’t affect the user in any way. It continues to see and use the forum accordingly to its original trust level.

As soon as the user does an action (opening a topic, posting a message…), the trust level returns to its initial value in the database and the interface.

It’s unlikely to cause any issues, but I’ve reported the bug to the team nonetheless.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [March 1, 2023, 1:38am UTC](https://meta.discourse.org/t/user-trust-level-resets-to-zero-when-unlocked/255444/8 "2023-03-01T01:38:11Z")

</div>

I think I have this fixed per:

[https://github.com/discourse/discourse/pull/20492](https://github.com/discourse/discourse/pull/20492)

I feel like this may have regressed when we made some fixes around group TL grants.

Not merged yet… but hopefully will be merged soon.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [March 1, 2023, 9:00pm UTC](https://meta.discourse.org/t/user-trust-level-resets-to-zero-when-unlocked/255444/11 "2023-03-01T21:00:39Z")

</div>

Closed on March 1, 2023, 9:00pm UTC

This topic was automatically closed after 16 hours. New replies are no longer allowed.
