Is it possible to disable account self-deletion?

AI-generated summary

In a discussion titled ‘Is it possible to disable account self-deletion?’, blattersturm raises a concern about users abusing self-deletion to exploit payment systems tied to forum accounts, requesting either disabling self-deletion or a webhook for cleanup. ondrej suggests existing settings like delete user max post age and delete all posts max, but blattersturm clarifies these apply to admin deletions, not user self-deletion. codinghorror supports the request, proposing a new setting based on account age and post count, and asks @eviltrout to schedule it. eviltrout delegates to riking, who implements the feature via GitHub PR #9334. The new setting, delete_user_self_max_post_count, allows admins to limit self-deletion by post count or disable it entirely by setting the value to -1 codinghorror.

According to an earlier post:

Discourse allows users to self-delete their account when they have <X posts. Our issue is that we have payment functionality tied to forum account IDs and the Patreon plugin’s email linking, and we have users abusing the self-deletion functionality in order to redeem their paid functionality multiple times.

Can we disable account self-deletion, or alternately output a webhook when a user self-deletes their account so their data can be purged from our purchase processing service?

delete user max post age

delete all posts max


Will these settings help you

This seems to be for admins being able to delete accounts, not a user deleting their own ‘new’ account. :confused:

This is the second request I’ve seen for this, and I think it makes sense anyways so I’ll be the third. Can we schedule a setting here @eviltrout? For new user auto-deletion thresholds, I think there are two variables: account age in days and number of posts.

@riking can you add this one to your list too? Should be fairly straightforward.

The wonders of good code hygeine :smile:

https://github.com/discourse/discourse/pull/9334

The new setting

delete_user_self_max_post_count

The maximum number of posts a user can have while allowing self-service account deletion. Set to -1 to disable self-service account deletion.