mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #5703 from beganovich/v5-1405-improve-client-existence-middleware
(v5) Improve CheckClientExistence.php middleware
This commit is contained in:
commit
40592a77c0
@ -31,6 +31,8 @@ class CheckClientExistence
|
|||||||
$multiple_contacts = ClientContact::query()
|
$multiple_contacts = ClientContact::query()
|
||||||
->where('email', auth('contact')->user()->email)
|
->where('email', auth('contact')->user()->email)
|
||||||
->whereNotNull('email')
|
->whereNotNull('email')
|
||||||
|
->where('email', '<>', '')
|
||||||
|
->where('account_id', auth('contact')->user()->client->company->account->id)
|
||||||
->whereNull('deleted_at')
|
->whereNull('deleted_at')
|
||||||
->distinct('company_id')
|
->distinct('company_id')
|
||||||
->distinct('email')
|
->distinct('email')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user