# Thread unsafe current\_user usage in Auth::DefaultCurrentUserProvider

**URL:** <https://meta.discourse.org/t/thread-unsafe-current-user-usage-in-auth-defaultcurrentuserprovider/225671>\
**Category:** Bug\
**Created:** [April 29, 2022, 2:26pm UTC](https://meta.discourse.org/t/thread-unsafe-current-user-usage-in-auth-defaultcurrentuserprovider/225671 "2022-04-29T14:26:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [May 2, 2022, 7:28am UTC](https://meta.discourse.org/t/thread-unsafe-current-user-usage-in-auth-defaultcurrentuserprovider/225671/2 "2022-05-02T07:28:14Z")

</div>

I see …

Something like this I guess:

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

@daniel / @david / @tgxworld ?

It adds a new “find” query once a minute, but I guess this is acceptable since it will not happen every single request. I kept the old interface in place.

Can not easily be tuned further without breaking the plugin interface which would be a bit of a nightmare.

---

_[View the full topic](https://meta.discourse.org/t/thread-unsafe-current-user-usage-in-auth-defaultcurrentuserprovider/225671)._
