From 073599383936029a3adf5cc1c8776c59f97901be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 11 Nov 2020 12:17:23 +0100 Subject: [PATCH] set ref at create --- htdocs/adherents/class/adherent.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 967002b0b6e..76f7fd8485c 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -525,9 +525,10 @@ class Adherent extends CommonObject // Insert member $sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent"; - $sql .= " (datec,login,fk_user_author,fk_user_mod,fk_user_valid,morphy,fk_adherent_type,entity,import_key)"; + $sql .= " (ref, datec,login,fk_user_author,fk_user_mod,fk_user_valid,morphy,fk_adherent_type,entity,import_key)"; $sql .= " VALUES ("; - $sql .= " '".$this->db->idate($this->datec)."'"; + $sql .= " '(PROV)'"; + $sql .= ", '".$this->db->idate($this->datec)."'"; $sql .= ", ".($this->login ? "'".$this->db->escape($this->login)."'" : "null"); $sql .= ", ".($user->id > 0 ? $user->id : "null"); // Can be null because member can be created by a guest or a script $sql .= ", null, null, '".$this->db->escape($this->morphy)."'";