mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Use same config for user purge
This commit is contained in:
@@ -32,7 +32,7 @@ class PurgeDeletedAccounts implements ShouldQueue
|
||||
{
|
||||
// Find users that were soft-deleted 6 months ago
|
||||
User::onlyTrashed()
|
||||
->where('deleted_at', '<', now()->subMonths(6))
|
||||
->where('deleted_at', '<', now()->subDays(config('nntmux.purge_inactive_users_days')))
|
||||
->get()
|
||||
->each(function ($user) {
|
||||
$user->forceDelete(); // Permanently delete the user
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Jobs\PurgeDeletedAccounts;
|
||||
use App\Jobs\RemoveInactiveAccounts;
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
use Illuminate\Support\Facades\Schedule;
|
||||
@@ -32,4 +33,5 @@ Schedule::command('nntmux:collect-stats')->hourly();
|
||||
Schedule::command('nntmux:populate-steam-apps')->monthly();
|
||||
if (config('nntmux.purge_inactive_users') === true) {
|
||||
Schedule::job(new RemoveInactiveAccounts)->daily();
|
||||
Schedule::job(new PurgeDeletedAccounts)->daily();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user