From 189bda93bd4b3bbd71b525d73cf6fb9fc29f2cd2 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Sun, 28 Apr 2019 21:59:09 +0200 Subject: [PATCH] Add option to disable purging of inactive user accounts --- .env.example | 2 ++ Changelog | 1 + app/Console/Kernel.php | 4 +++- config/nntmux.php | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index b06c157cc..7298bfb7d 100644 --- a/.env.example +++ b/.env.example @@ -150,3 +150,5 @@ TELESCOPE_SCHEDULE_WATCHER=true HORIZON_PREFIX=horizon: POSTMARK_TOKEN= + +PURGE_INACTIVE_USERS=false; diff --git a/Changelog b/Changelog index 3d45c50d1..73e9823bc 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2019-04-28 DariusIII + * Chg: Add option to disable purging of inactive user accounts * Fix: Throw API error if apikey is missing * Chg: Update nesbot/carbon (2.17.0 => 2.17.1) and intervention/imagecache (2.3.3 => 2.3.4) 2019-04-25 DariusIII diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index b78cf949d..1a89c191d 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -30,7 +30,9 @@ class Kernel extends ConsoleKernel $schedule->exec('php '.base_path().'/misc/testing/DB/checkUsers.php')->twiceDaily(1, 13); $schedule->command('telescope:prune')->daily(); $schedule->command('horizon:snapshot')->everyFiveMinutes(); - $schedule->job(new RemoveInactiveAccounts())->daily(); + if (config('nntmux.purge_inactive_users') === true) { + $schedule->job(new RemoveInactiveAccounts())->daily(); + } } /** diff --git a/config/nntmux.php b/config/nntmux.php index 970a8452b..2b84a5954 100644 --- a/config/nntmux.php +++ b/config/nntmux.php @@ -22,4 +22,5 @@ return [ 'multiprocessing_max_children_override' => env('NN_MULTIPROCESSING_MAX_CHILDREN_OVERRIDE', 0), 'multiprocessing_log_type' => env('NN_MULTIPROCESSING_LOG_TYPE', 6), 'multiprocessing_child_output_type' => env('NN_MULTIPROCESSING_CHILD_OUTPUT_TYPE', 1), + 'purge_inactive_users' => env('PURGE_INACTIVE_USERS', false), ];