From 9f6eb02afc0ce5de2d32eedc4ce0351e0249618f Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 3 Jun 2016 12:13:59 -0700 Subject: [PATCH] Don't purge users where show_in_list = 1 This is necessary so hosted customers can't hard-delete my account :-/ --- app/Console/Commands/Purge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/Purge.php b/app/Console/Commands/Purge.php index 51c188b7c8..bef0fdf754 100644 --- a/app/Console/Commands/Purge.php +++ b/app/Console/Commands/Purge.php @@ -140,7 +140,7 @@ class Purge extends Command $supplier->forceDelete(); } - $users = User::whereNotNull('deleted_at')->withTrashed()->get(); + $users = User::whereNotNull('deleted_at')->where('show_in_list','=','0')->withTrashed()->get(); $this->info($users->count().' users purged.'); $user_assoc = 0; foreach ($users as $user) {