From 6304f13ff8ccf3ac343ed94f51f7f9ee4542fa72 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 1 Oct 2006 15:32:28 +0000 Subject: [PATCH] Ajout de traces --- htdocs/user.class.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/user.class.php b/htdocs/user.class.php index a2a62559e43..e116d42f0bd 100644 --- a/htdocs/user.class.php +++ b/htdocs/user.class.php @@ -117,7 +117,7 @@ class User $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; if ($login) { - $sql .= " WHERE u.login = '$login'"; + $sql .= " WHERE u.login = '".$login."'"; } else { @@ -132,8 +132,8 @@ class User { $this->id = $obj->rowid; $this->ldap_sid = $obj->ldap_sid; - $this->nom = stripslashes($obj->name); - $this->prenom = stripslashes($obj->firstname); + $this->nom = $obj->name; + $this->prenom = $obj->firstname; $this->fullname = $this->prenom . ' ' . $this->nom; $this->code = $obj->code; @@ -145,7 +145,7 @@ class User $this->email = $obj->email; $this->admin = $obj->admin; $this->contact_id = $obj->fk_socpeople; - $this->note = stripslashes($obj->note); + $this->note = $obj->note; $this->statut = $obj->statut; $this->lang = $obj->lang; @@ -165,6 +165,7 @@ class User else { $this->error=$this->db->error(); + dolibarr_syslog("User.class::fetch Error -1, fails to get user - ".$this->error." - sql=".$sql); return -1; } @@ -190,7 +191,8 @@ class User else { $this->error=$this->db->error(); - return -1; + dolibarr_syslog("User.class::fetch Error -2, fails to get setup user - ".$this->error." - sql=".$sql); + return -2; } // Recupere parametrage propre à la page et à l'utilisateur