Fix error message

This commit is contained in:
Laurent Destailleur
2025-08-11 00:25:37 +02:00
parent 5671ef55ff
commit 654d3eda8a

View File

@@ -1275,7 +1275,7 @@ abstract class CommonObject
} elseif ($obj = $this->db->fetch_object($resql_allowed_contacts)) {
if ($obj->cnt == 0) {
$langs->load("companies");
$this->error = $langs->trans("ErrorCommercialNotAllowedForThirdparty", $user->admin);
$this->error = $langs->trans("ErrorCommercialNotAllowedForThirdparty", $user->id);
dol_syslog(get_class($this)."::add_contact ".$this->error, LOG_ERR);
return -3;
}