mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 13:57:41 -08:00
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:
parent
f8ac9a3f77
commit
9f6eb02afc
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue