# 用户可以在其个人资料上显示其 User ID 吗？

**URL:** https://meta.discourse.org/t/can-users-make-their-user-id-visible-on-their-profile/394001
**Category:** Development
**Created:** [2026年一月21日 16:20 UTC](https://meta.discourse.org/t/can-users-make-their-user-id-visible-on-their-profile/394001 "2026-01-21T16:20:21Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [2026年一月22日 23:12 UTC](https://meta.discourse.org/t/can-users-make-their-user-id-visible-on-their-profile/394001/10 "2026-01-22T23:12:19Z")

</div>

使用上面 @pfaffman 的帖子，然后您可以拥有一个使用 `{{@user.id}}` 的组件。请参阅 [https://meta.discourse.org/t/theme-developer-tutorial-5-building-and-using-components/357800，但我认为您可以在](https://meta.discourse.org/t/theme-developer-tutorial-5-building-and-using-components/357800%EF%BC%8C%E4%BD%86%E6%88%91%E8%AE%A4%E4%B8%BA%E6%82%A8%E5%8F%AF%E4%BB%A5%E5%9C%A8) Discourse TC UI 的“编辑 CSS/HTML”\>“JS”中使用 `api.renderInOutlet()` 来实现它。

---

_[View the full topic](https://meta.discourse.org/t/can-users-make-their-user-id-visible-on-their-profile/394001)._
