mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 05:14:34 -04:00
fixes for client contact enforcement
This commit is contained in:
parent
03ec5e042d
commit
f3a3e63ccb
@ -92,7 +92,7 @@ class ClientContact extends Authenticatable implements HasLocalePreference
|
|||||||
'custom_value4',
|
'custom_value4',
|
||||||
'email',
|
'email',
|
||||||
'is_primary',
|
'is_primary',
|
||||||
'client_id',
|
// 'client_id',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,9 +56,11 @@ class ClientContactRepository extends BaseRepository
|
|||||||
|
|
||||||
if (! $update_contact) {
|
if (! $update_contact) {
|
||||||
$update_contact = ClientContactFactory::create($client->company_id, $client->user_id);
|
$update_contact = ClientContactFactory::create($client->company_id, $client->user_id);
|
||||||
$update_contact->client_id = $client->id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//10-09-2021 - enforce the client->id and remove client_id from fillables
|
||||||
|
$update_contact->client_id = $client->id;
|
||||||
|
|
||||||
/* We need to set NULL email addresses to blank strings to pass authentication*/
|
/* We need to set NULL email addresses to blank strings to pass authentication*/
|
||||||
if(array_key_exists('email', $contact) && is_null($contact['email']))
|
if(array_key_exists('email', $contact) && is_null($contact['email']))
|
||||||
$contact['email'] = '';
|
$contact['email'] = '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user