Don't purge users where show_in_list = 1

This is necessary so hosted customers can't hard-delete my account :-/
This commit is contained in:
snipe 2016-06-03 12:13:59 -07:00
parent f8ac9a3f77
commit 9f6eb02afc

View file

@ -140,7 +140,7 @@ class Purge extends Command
$supplier->forceDelete(); $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.'); $this->info($users->count().' users purged.');
$user_assoc = 0; $user_assoc = 0;
foreach ($users as $user) { foreach ($users as $user) {