From 3477cf6bd3fc7c92425020a5e95beb53f906acce Mon Sep 17 00:00:00 2001 From: gauthier Date: Tue, 29 Jan 2019 18:01:28 +0100 Subject: [PATCH] FIX : must fetch member in current entity --- htdocs/user/class/user.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index ef2b828f6e5..42770041a5b 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1483,9 +1483,9 @@ class User extends CommonObject // This user is linked with a member, so we also update member information // if this is an update. $adh=new Adherent($this->db); - $result=$adh->fetch($this->fk_member); + $result=$adh->fetch('',$this->fk_member); - if ($result >= 0) + if ($result > 0) { $adh->firstname=$this->firstname; $adh->lastname=$this->lastname; @@ -1520,7 +1520,7 @@ class User extends CommonObject $error++; } } - else + elseif(!empty($adh->error) || !empty($adh->errors)) { $this->error=$adh->error; $this->errors=$adh->errors;