mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Adjust invitation controller to deal with deleted contacts
This commit is contained in:
parent
8f2f6f93ea
commit
37d6701780
@ -87,6 +87,10 @@ class InvitationController extends Controller
|
||||
if(!$invitation)
|
||||
return abort(404,'The resource is no longer available.');
|
||||
|
||||
/* 12/01/2022 Clean up an edge case where if the contact is trashed, restore if a invitation comes back. */
|
||||
if($invitation->contact->trashed())
|
||||
$invitation->contact->restore();
|
||||
|
||||
/* Return early if we have the correct client_hash embedded */
|
||||
$client_contact = $invitation->contact;
|
||||
|
||||
|
@ -34,7 +34,7 @@ class CheckClientExistence
|
||||
->where('email', auth('contact')->user()->email)
|
||||
->whereNotNull('email')
|
||||
->where('email', '<>', '')
|
||||
->whereNull('deleted_at')
|
||||
// ->whereNull('deleted_at')
|
||||
->distinct('company_id')
|
||||
->distinct('email')
|
||||
->whereNotNull('company_id')
|
||||
|
Loading…
Reference in New Issue
Block a user