diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index d83005134a6..14fcd23469a 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -478,7 +478,6 @@ class Contact extends CommonObject $this->pays_code = $obj->fk_pays?$obj->pays_code:''; $this->pays = ($obj->fk_pays > 0)?$langs->transnoentities("Country".$obj->pays_code):$langs->transnoentities("SelectCountry"); - $this->societeid = $obj->fk_soc; $this->socid = $obj->fk_soc; $this->socname = $obj->socname; $this->poste = $obj->poste; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 3c9b91e3f31..fd4e64a68d2 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -837,7 +837,7 @@ class User extends CommonObject { $sql = "UPDATE ".MAIN_DB_PREFIX."user"; $sql.= " SET fk_socpeople=".$contact->id; - if ($contact->societeid) $sql.=", fk_societe=".$contact->societeid; + if ($contact->socid) $sql.=", fk_societe=".$contact->socid; $sql.= " WHERE rowid=".$this->id; $resql=$this->db->query($sql);