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:
parent
6ec36ab04e
commit
9f2ac7cae3
@ -1298,7 +1298,7 @@ class User extends CommonObject
|
|||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// Cree et positionne $this->id
|
// Cree et positionne $this->id
|
||||||
$result=$this->create($user);
|
$result=$this->create($user, 1);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."user";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."user";
|
||||||
@ -1371,7 +1371,7 @@ class User extends CommonObject
|
|||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// Create and set $this->id
|
// Create and set $this->id
|
||||||
$result=$this->create($user);
|
$result=$this->create($user, 1);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$newpass=$this->setPassword($user, $this->pass);
|
$newpass=$this->setPassword($user, $this->pass);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user