From 9f2ac7cae308734c38e951b5d5a49e1d8ae84788 Mon Sep 17 00:00:00 2001 From: oscim Date: Thu, 3 Oct 2019 09:47:06 +0200 Subject: [PATCH] Fix error in triggers process If methode create_from_contact is called; In process this method containt call create methode, but trigger by action USER_CREATE is called twice. the call to the create method should not trigger triggers same for the create_from_members method --- htdocs/user/class/user.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 04ec5bf0698..30eb6f1cd27 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1298,7 +1298,7 @@ class User extends CommonObject $this->db->begin(); // Cree et positionne $this->id - $result=$this->create($user); + $result=$this->create($user, 1); if ($result > 0) { $sql = "UPDATE ".MAIN_DB_PREFIX."user"; @@ -1371,7 +1371,7 @@ class User extends CommonObject $this->db->begin(); // Create and set $this->id - $result=$this->create($user); + $result=$this->create($user, 1); if ($result > 0) { $newpass=$this->setPassword($user, $this->pass);