# Anonymize doesn't remove custom fields

**URL:** https://meta.discourse.org/t/anonymize-doesnt-remove-custom-fields/94818
**Category:** Bug
**Created:** [August 15, 2018, 9:06pm UTC](https://meta.discourse.org/t/anonymize-doesnt-remove-custom-fields/94818 "2018-08-15T21:06:26Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Silvanus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/silvanus/32/62831_2.png) [@Silvanus](https://meta.discourse.org/u/Silvanus)
#### Post date: [August 15, 2018, 9:06pm UTC](https://meta.discourse.org/t/anonymize-doesnt-remove-custom-fields/94818/1 "2018-08-15T21:06:26Z")

</div>

Anonymize doesn’t remove custom fields that have been added to profile.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [August 15, 2018, 11:54pm UTC](https://meta.discourse.org/t/anonymize-doesnt-remove-custom-fields/94818/2 "2018-08-15T23:54:39Z")

</div>

What are your thoughts on this @gerhard?

---

<div class="post-metadata">

### Author: ![Silvanus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/silvanus/32/62831_2.png) [@Silvanus](https://meta.discourse.org/u/Silvanus)
#### Post date: [August 16, 2018, 5:38am UTC](https://meta.discourse.org/t/anonymize-doesnt-remove-custom-fields/94818/3 "2018-08-16T05:38:26Z")

</div>

The field has been added manually. Below a screenshot from customizer and the anonymized profile. (Normal Finnish locale.)

 ![Screenshot_20180816-083455](https://global.discourse-cdn.com/meta/original/3X/2/7/2721419a89e0fefc1d94bddc22394e449d5ba70a.jpeg)

 ![Screenshot_20180816-083522](https://global.discourse-cdn.com/meta/original/3X/c/d/cdc04dd05813b66a2e28ead6136312155892ad59.jpeg)

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [August 16, 2018, 7:33am UTC](https://meta.discourse.org/t/anonymize-doesnt-remove-custom-fields/94818/4 "2018-08-16T07:33:19Z")

</div>

I guess it’s a good idea to always remove those values. We should assume that they contain some kind of identifying information.

Adding it to my list.

---

<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: [August 16, 2018, 10:04am UTC](https://meta.discourse.org/t/anonymize-doesnt-remove-custom-fields/94818/5 "2018-08-16T10:04:35Z")

</div>

Shouldn’t plugins implement an “on anoymize” for cases like this, maybe they store stuff that needs to go away in plugin store or a custom table.

Also, some custom fields may be private, do we want to anonymize them?

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [August 16, 2018, 10:18am UTC](https://meta.discourse.org/t/anonymize-doesnt-remove-custom-fields/94818/6 "2018-08-16T10:18:40Z")

</div>

Plugins should handle the `user_anonymized` event, if they need to do some cleanup. I don’t plan on removing them automatically.

But removing values of User Fields defined in `admin/customize/user_fields` makes sense.

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [September 6, 2018, 10:27pm UTC](https://meta.discourse.org/t/anonymize-doesnt-remove-custom-fields/94818/7 "2018-09-06T22:27:09Z")

</div>

Thanks for reporting this issue.  
[https://github.com/discourse/discourse/commit/797cbf8653f9b8c75e38695d9abc7654a631eea7](https://github.com/discourse/discourse/commit/797cbf8653f9b8c75e38695d9abc7654a631eea7)

---

<div class="post-metadata">

### Author: ![Silvanus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/silvanus/32/62831_2.png) [@Silvanus](https://meta.discourse.org/u/Silvanus)
#### Post date: [September 7, 2018, 5:13am UTC](https://meta.discourse.org/t/anonymize-doesnt-remove-custom-fields/94818/8 "2018-09-07T05:13:18Z")

</div>

Will there be a fix that goes through alreazy anonymized accounts and removes values?

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [September 7, 2018, 10:07am UTC](https://meta.discourse.org/t/anonymize-doesnt-remove-custom-fields/94818/9 "2018-09-07T10:07:48Z")

</div>

No, there are no plans to remove values from already anonymized accounts.

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [September 8, 2018, 10:07am UTC](https://meta.discourse.org/t/anonymize-doesnt-remove-custom-fields/94818/10 "2018-09-08T10:07:51Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
