# 向目录项序列化器添加用户属性

**URL:** https://meta.discourse.org/t/adding-user-attributes-to-the-directory-item-serializer/130927
**Category:** Development
**Created:** [2019年十月14日 06:45 UTC](https://meta.discourse.org/t/adding-user-attributes-to-the-directory-item-serializer/130927 "2019-10-14T06:45:10Z")
**Posts on this page:** 1
**Showing post:** 20

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2020年三月16日 14:26 UTC](https://meta.discourse.org/t/adding-user-attributes-to-the-directory-item-serializer/130927/20 "2020-03-16T14:26:37Z")

</div>

在此闭环。我们决定不再向目录序列化器添加任何属性。相反，我们对用户序列化的性能进行了大幅改进。我们将用户卡片拆分到独立的路线上，并新增了一条可一次性返回多个卡片的路线。

您可以在以下主题组件中找到使用此新路线的示例：

> [@User Card Directory](https://meta.discourse.org/t/user-card-directory/144479?u=david):
>
> discourse2Summary User Card Directory changes the /u user directory to display a grid of user cards instead of the stats table.eyeglassesPreview [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/user-card-directory)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-user-card-directory](https://github.com/discourse/discourse-user-card-directory)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component Features Settings Name Description h…

---

_[View the full topic](https://meta.discourse.org/t/adding-user-attributes-to-the-directory-item-serializer/130927)._
