FIX: set upper limit on clean up invalid users (10 years)

FIX: set upper limit on clean up invalid users (10 years)

Note… this setting is quite new so I am not adding a migration here to clean up history. Instead next time users save the setting it will complain.

Also explicitly call out that the value 0 is special and used to disable the job.

diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index c433b7f..ead623e 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -1858,7 +1858,7 @@ en:
 
     ignored_users_message_gap_days: "How long to wait before notifying moderators again about a user who has been ignored by many others."
 
-    clean_up_inactive_users_after_days: "Number of days before an inactive user (trust level 0 without any posts) is removed."
+    clean_up_inactive_users_after_days: "Number of days before an inactive user (trust level 0 without any posts) is removed. To disable clean up set to 0."
 
     user_website_domains_whitelist: "User website will be verified against these domains. Pipe-delimited list."
 
diff --git a/config/site_settings.yml b/config/site_settings.yml
index 5ec0106..82f55ee 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -552,6 +552,8 @@ users:
     min: 1
   clean_up_inactive_users_after_days:
     default: 730
+    min: 0
+    max: 3650
 
 groups:
   enable_group_directory:

GitHub sha: 5d96c5cb

2 Likes