# 登录时删除用户名

**URL:** https://meta.discourse.org/t/usernames-are-deleted-on-login/359378
**Category:** Support
**Tags:** saml
**Created:** [2025年三月29日 01:39 UTC](https://meta.discourse.org/t/usernames-are-deleted-on-login/359378 "2025-03-29T01:39:09Z")
**Posts on this page:** 1
**Showing post:** 3

<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: [2025年三月29日 02:00 UTC](https://meta.discourse.org/t/usernames-are-deleted-on-login/359378/3 "2025-03-29T02:00:54Z")

</div>

> [@justintime](#):
>
> 每次有人清除缓存并重新登录 Discourse 时，他们的用户名都会被清除，并重置为“user”一词，后跟一个数字。如果我手动修复用户名，下次重新登录时，用户名会再次重置为“user1”。

我有一种感觉，你们的 SAML 实现以某种方式覆盖了用户名，因此当他们重新验证时，我们会使用 SAML 提供的名称。  
我会检查 `saml_clear_username` 或 `auth overrides username` 设置。

---

_[View the full topic](https://meta.discourse.org/t/usernames-are-deleted-on-login/359378)._
