fix: fix invoice page not showing properly

This commit is contained in:
Regis Freyd
2018-08-01 18:04:42 +02:00
committed by Régis Freyd
parent 1bd7259eb2
commit 665704ce3c
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -147,14 +147,13 @@ class SettingsController extends Controller
DB::table($tableName)->where('account_id', $account->id)->delete();
}
DB::table('accounts')->where('id', $account->id)->delete();
$account = auth()->user()->account;
if ($account->isSubscribed() && auth()->user()->has_access_to_paid_version_for_free == 0) {
$account->subscription($account->getSubscribedPlanName())->cancelNow();
}
DB::table('accounts')->where('id', $account->id)->delete();
auth()->logout();
$user->forceDelete();