Merge pull request #5703 from beganovich/v5-1405-improve-client-existence-middleware
(v5) Improve CheckClientExistence.php middleware
This commit is contained in:
commit
40592a77c0
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue