mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Catch archived / deleted subscriptions
This commit is contained in:
parent
3e44bc0f4f
commit
66452a9f2a
@ -25,6 +25,10 @@ class SubscriptionPurchaseController extends Controller
|
||||
{
|
||||
App::setLocale($subscription->company->locale());
|
||||
|
||||
if ($subscription->trashed()) {
|
||||
return $this->render('generic.not_available', ['account' => $subscription->company->account, 'company' => $subscription->company]);
|
||||
}
|
||||
|
||||
/* Make sure the contact is logged into the correct company for this subscription */
|
||||
if (auth()->guard('contact')->user() && auth()->guard('contact')->user()->company_id != $subscription->company_id) {
|
||||
auth()->guard('contact')->logout();
|
||||
|
Loading…
x
Reference in New Issue
Block a user