Fix #21768 The Contact is now showing in the card, if no company is selected
This commit is contained in:
Laurent Destailleur 2022-08-22 13:41:20 +02:00 committed by GitHub
commit 81dc2bf901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2301,6 +2301,12 @@ if ($action == 'create' || $action == 'adduserldap') {
print ' ('.$langs->trans("DomainUser").')';
}
} elseif ($object->socid > 0 && $object->contact_id > 0) { // external user with a link to a contact
print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', ' '); // We keep thirdparty empty, contact is already set
print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, '', false, 1);
if ($object->ldap_sid) {
print ' ('.$langs->trans("DomainUser").')';
}
} elseif (!($object->socid > 0) && $object->contact_id > 0) { // internal user with a link to a contact
print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set
print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, '', false, 1);
if ($object->ldap_sid) {