mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Additional checks
This commit is contained in:
parent
bdbe8f8f6c
commit
2858ff8946
@ -947,7 +947,35 @@ class CheckData extends Command
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Company::whereDoesntHave('company_users', function ($query){
|
||||||
|
$query->where('is_owner', 1);
|
||||||
|
})
|
||||||
|
->cursor()
|
||||||
|
->when(Ninja::isHosted())
|
||||||
|
->each(function ($c){
|
||||||
|
|
||||||
|
$this->logMessage("Orphan Account # {$c->account_id}");
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
CompanyUser::whereDoesntHave('tokens')
|
||||||
|
->cursor()
|
||||||
|
->when(Ninja::isHosted())
|
||||||
|
->each(function ($cu){
|
||||||
|
|
||||||
|
$this->logMessage("Missing tokens for Company User # {$cu->id}");
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
CompanyUser::whereDoesntHave('user')
|
||||||
|
->cursor()
|
||||||
|
->when(Ninja::isHosted())
|
||||||
|
->each(function ($cu) {
|
||||||
|
|
||||||
|
$this->logMessage("Missing user for Company User # {$cu->id}");
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user