# Add a custom per-user setting in a plugin

**URL:** <https://meta.discourse.org/t/add-a-custom-per-user-setting-in-a-plugin/94048>\
**Category:** Developers\
**Tags:** plugin-guides, how-to\
**Created:** [August 6, 2018, 8:39pm UTC](https://meta.discourse.org/t/add-a-custom-per-user-setting-in-a-plugin/94048 "2018-08-06T20:39:54Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [September 4, 2018, 12:36pm UTC](https://meta.discourse.org/t/add-a-custom-per-user-setting-in-a-plugin/94048/4 "2018-09-04T12:36:40Z")

</div>

Per [DEV: Allow plugins to whitelist specific user custom\_fields for editi… · discourse/discourse@4382fb5 · GitHub](https://github.com/discourse/discourse/commit/4382fb5facb035f5b414c6c7257dc828327a57c7), custom fields must now be added to a whitelist to allow editing by users. All that is needed is a single line in `plugin.rb`:

```ruby
register_editable_user_custom_field :my_field

```

@gdpelican @LeoMcA I have updated the OP with this extra step, and also pulled in the comments from your second and third posts. Please feel free to update anything else you feel is necessary.

---

_[View the full topic](https://meta.discourse.org/t/add-a-custom-per-user-setting-in-a-plugin/94048)._
