mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Ensure all files are deleted with the account
This commit is contained in:
parent
b32a9110c7
commit
145c394e6b
@ -1251,6 +1251,10 @@ class AccountController extends BaseController
|
||||
$account = Auth::user()->account;
|
||||
\Log::info("Canceled Account: {$account->name} - {$user->email}");
|
||||
|
||||
Document::scope()->each(function($item, $key) {
|
||||
$item->delete();
|
||||
});
|
||||
|
||||
$this->accountRepo->unlinkAccount($account);
|
||||
if ($account->company->accounts->count() == 1) {
|
||||
$account->company->forceDelete();
|
||||
|
Loading…
x
Reference in New Issue
Block a user