mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01: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',
|
||||
'email',
|
||||
'is_primary',
|
||||
'client_id',
|
||||
// 'client_id',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -56,9 +56,11 @@ class ClientContactRepository extends BaseRepository
|
||||
|
||||
if (! $update_contact) {
|
||||
$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*/
|
||||
if(array_key_exists('email', $contact) && is_null($contact['email']))
|
||||
$contact['email'] = '';
|
||||
|
Loading…
Reference in New Issue
Block a user