diff --git a/htdocs/user.class.php b/htdocs/user.class.php index 34c6f924e13..8cefac46aab 100644 --- a/htdocs/user.class.php +++ b/htdocs/user.class.php @@ -114,15 +114,15 @@ class User } else { - $sql .= " WHERE u.rowid = $this->id"; + $sql .= " WHERE u.rowid = ".$this->id; } $result = $this->db->query($sql); if ($result) { - if ($this->db->num_rows($result)) + $obj = $this->db->fetch_object($result); + if ($obj) { - $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; $this->nom = stripslashes($obj->name); $this->prenom = stripslashes($obj->firstname);