mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 05:32:39 +01: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()
|
||||
->where('email', auth('contact')->user()->email)
|
||||
->whereNotNull('email')
|
||||
->where('email', '<>', '')
|
||||
->where('account_id', auth('contact')->user()->client->company->account->id)
|
||||
->whereNull('deleted_at')
|
||||
->distinct('company_id')
|
||||
->distinct('email')
|
||||
|
Loading…
Reference in New Issue
Block a user