diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 7fc268568c8..7f8959975f6 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -537,6 +537,9 @@ if (empty($reshook)) { $sql .= " SET fk_socpeople=".((int) $contactid); if (!empty($contact->socid)) { $sql .= ", fk_soc=".((int) $contact->socid); + } elseif($socid > 0){ + $sql .= ", fk_soc=''"; + setEventMessages($langs->trans("WarningUserDifferentContactSocid"),'','warnings'); // Add message if post socid != $contact->socid } $sql .= " WHERE rowid = ".((int) $object->id); } elseif ($socid > 0) {