diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index c7807bc6b00..0b3a4dd45d4 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -578,7 +578,7 @@ class Adherent extends CommonObject $lthirdparty=new Societe($this->db); $result=$lthirdparty->fetch($this->fk_soc); - if ($result >= 0) + if ($result > 0) { $lthirdparty->address=$this->address; $lthirdparty->zip=$this->zip; @@ -600,7 +600,7 @@ class Adherent extends CommonObject $error++; } } - else + elseif(!empty($lthirdparty->error)) { $this->error=$lthirdparty->error; $error++; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 5a154be7478..e305439e34a 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1485,7 +1485,7 @@ class User extends CommonObject $adh=new Adherent($this->db); $result=$adh->fetch($this->fk_member); - if ($result > 0 && $adh->entity == $conf->entity) + if ($result > 0) { $adh->firstname=$this->firstname; $adh->lastname=$this->lastname;