From c31318f29d36e41cb3a24d97bcab641d1ea99a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timote=CC=81=20Fallais?= Date: Thu, 7 Mar 2019 09:15:43 +0100 Subject: [PATCH] Update libelle of user (making Mailman working correctly) --- htdocs/adherents/class/adherent.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 688b2c9741a..15cb81f8474 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -563,6 +563,18 @@ class Adherent extends CommonObject $sql.= ", fk_user_mod = ".($user->id>0?$user->id:'null'); // Can be null because member can be create by a guest $sql.= " WHERE rowid = ".$this->id; + $sql2 = "SELECT libelle"; + $sql2.= " FROM ".MAIN_DB_PREFIX."adherent_type"; + $sql2.= " WHERE rowid = ".$this->typeid; + $resql2 = $this->db->query($sql2); + if($resql2) + { + while ($obj=$this->db->fetch_object($resql2)) + { + $this->type=$obj->libelle; + } + } + dol_syslog(get_class($this)."::update update member", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql)