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
This commit is contained in:
oscim 2019-10-03 09:47:06 +02:00 committed by GitHub
parent 6ec36ab04e
commit 9f2ac7cae3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);