# ‘delete user self max post count’ not accepting ‘-1’ to disable

**URL:** https://meta.discourse.org/t/delete-user-self-max-post-count-not-accepting-1-to-disable/285162
**Category:** Bug
**Created:** [November 11, 2023, 10:03am UTC](https://meta.discourse.org/t/delete-user-self-max-post-count-not-accepting-1-to-disable/285162 "2023-11-11T10:03:09Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Plabforum](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/plabforum/32/449551_2.png) [@Plabforum](https://meta.discourse.org/u/Plabforum)
#### Post date: [November 11, 2023, 10:03am UTC](https://meta.discourse.org/t/delete-user-self-max-post-count-not-accepting-1-to-disable/285162/1 "2023-11-11T10:03:09Z")

</div>

It’s impossible to add “-1” value as it doesnt register “-”.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [November 11, 2023, 10:17am UTC](https://meta.discourse.org/t/delete-user-self-max-post-count-not-accepting-1-to-disable/285162/2 "2023-11-11T10:17:46Z")

</div>

I can repro this. There was a similar issue with another setting the other day. Let me see if I can get someone to take a look. 👍

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [November 11, 2023, 2:11pm UTC](https://meta.discourse.org/t/delete-user-self-max-post-count-not-accepting-1-to-disable/285162/4 "2023-11-11T14:11:34Z")

</div>

It looks like the issue was introduced here:

[https://github.com/discourse/discourse/pull/23816](https://github.com/discourse/discourse/pull/23816)

And it’s probably related to not providing `@min=` here:

[https://github.com/discourse/discourse/blob/main/app/assets/javascripts/admin/addon/components/site-settings/integer.hbs](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/admin/addon/components/site-settings/integer.hbs)

🤔

---

<div class="post-metadata">

### Author: ![anon65426961](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@anon65426961](https://meta.discourse.org/u/anon65426961)
#### Post date: [November 11, 2023, 8:40pm UTC](https://meta.discourse.org/t/delete-user-self-max-post-count-not-accepting-1-to-disable/285162/5 "2023-11-11T20:40:13Z")

</div>

Tested this and seems to be problem with text input for desktop, for some reason typing “-” won’t write in to those settings, but works fine on mobile app and for desktop can simply copy/paste “-1” in for that setting and works then.

---

<div class="post-metadata">

### Author: ![Plabforum](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/plabforum/32/449551_2.png) [@Plabforum](https://meta.discourse.org/u/Plabforum)
#### Post date: [November 11, 2023, 8:42pm UTC](https://meta.discourse.org/t/delete-user-self-max-post-count-not-accepting-1-to-disable/285162/6 "2023-11-11T20:42:08Z")

</div>

I used 0 and that worked as well.

---

<div class="post-metadata">

### Author: ![anon65426961](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@anon65426961](https://meta.discourse.org/u/anon65426961)
#### Post date: [November 11, 2023, 8:43pm UTC](https://meta.discourse.org/t/delete-user-self-max-post-count-not-accepting-1-to-disable/285162/7 "2023-11-11T20:43:26Z")

</div>

Well if the setting is at zero, does this mean accounts can still be self-deleted as long as there are no posts? Negative one is different than zero.

---

<div class="post-metadata">

### Author: ![Plabforum](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/plabforum/32/449551_2.png) [@Plabforum](https://meta.discourse.org/u/Plabforum)
#### Post date: [November 11, 2023, 8:45pm UTC](https://meta.discourse.org/t/delete-user-self-max-post-count-not-accepting-1-to-disable/285162/8 "2023-11-11T20:45:50Z")

</div>

Yes, after I used “0” it disabled the self-service account deletion for all users.

---

<div class="post-metadata">

### Author: ![anon65426961](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@anon65426961](https://meta.discourse.org/u/anon65426961)
#### Post date: [November 11, 2023, 9:00pm UTC](https://meta.discourse.org/t/delete-user-self-max-post-count-not-accepting-1-to-disable/285162/9 "2023-11-11T21:00:18Z")

</div>

For me there is still an option for a user to delete their account if they have not published any posts when that setting is set to zero.

---

<div class="post-metadata">

### Author: ![Plabforum](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/plabforum/32/449551_2.png) [@Plabforum](https://meta.discourse.org/u/Plabforum)
#### Post date: [November 11, 2023, 9:03pm UTC](https://meta.discourse.org/t/delete-user-self-max-post-count-not-accepting-1-to-disable/285162/10 "2023-11-11T21:03:27Z")

</div>

I just now created a dummy user account, with zero posts and the delete my account is visible with value “0”.

After I created one post from the dummy account, i had to log out and in, then the delete my account disappeared. So, yes we need the ability to insert “-1” to disable the self-service account deletion for all users including the users with 0 posts.

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [November 16, 2023, 2:12am UTC](https://meta.discourse.org/t/delete-user-self-max-post-count-not-accepting-1-to-disable/285162/13 "2023-11-16T02:12:47Z")

</div>

The fix for this will be here, should be merged later today:

[https://github.com/discourse/discourse/pull/24402](https://github.com/discourse/discourse/pull/24402)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [November 18, 2023, 8:00am UTC](https://meta.discourse.org/t/delete-user-self-max-post-count-not-accepting-1-to-disable/285162/15 "2023-11-18T08:00:24Z")

</div>

This topic was automatically closed after 2 days. New replies are no longer allowed.
