Skip to content

Commit

Permalink
Fix error in triggers process
Browse files Browse the repository at this point in the history
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
  • Loading branch information
oscim committed Oct 3, 2019
1 parent 6ec36ab commit 9f2ac7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/user/class/user.class.php
Expand Up @@ -1298,7 +1298,7 @@ public function create_from_contact($contact, $login = '', $password = '')
$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";
Expand Down Expand Up @@ -1371,7 +1371,7 @@ public function create_from_member($member, $login = '')
$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);
Expand Down

0 comments on commit 9f2ac7c

Please sign in to comment.