# What is this code add\_to\_serializer in all these plugins

**URL:** <https://meta.discourse.org/t/what-is-this-code-add-to-serializer-in-all-these-plugins/58913>\
**Category:** Development\
**Created:** [March 12, 2017, 5:07am UTC](https://meta.discourse.org/t/what-is-this-code-add-to-serializer-in-all-these-plugins/58913 "2017-03-12T05:07:15Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [January 21, 2021, 9:58pm UTC](https://meta.discourse.org/t/what-is-this-code-add-to-serializer-in-all-these-plugins/58913/27 "2021-01-21T21:58:11Z")

</div>

> [@net\_deamon](#):
>
> ```plaintext
> # I guess this should be the default @ discourse. PR maybe?
> add_to_serializer(:user, :custom_fields, false) {
> 
> ```

This should absolutely not be the default. Not all user custom fields should be displayed to the user (e.g. see Staff Notes).

---

_[View the full topic](https://meta.discourse.org/t/what-is-this-code-add-to-serializer-in-all-these-plugins/58913)._
