From ed45dad87f6775cafb596db8affa9b453e77d9b6 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 17 Oct 2006 06:59:07 +0000 Subject: [PATCH] Modification mineure du code --- htdocs/user.class.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/htdocs/user.class.php b/htdocs/user.class.php index 00c79d1e0e8..2429bcbf159 100644 --- a/htdocs/user.class.php +++ b/htdocs/user.class.php @@ -4,7 +4,7 @@ * Copyright (c) 2004-2006 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005 Regis Houssin + * Copyright (C) 2005-2006 Regis Houssin * Copyright (C) 2005 Lionel COUSTEIX * * This program is free software; you can redistribute it and/or modify @@ -783,18 +783,16 @@ class User $this->nom=trim($this->nom); $this->prenom=trim($this->prenom); $this->login=trim($this->login); - if ($conf->global->DATABASE_PWD_ENCRYPTED) + + if ($conf->global->DATABASE_PWD_ENCRYPTED && $this->oldpass != $this->pass) { - $this->pass=trim($this->pass); - if ($this->oldpass != $this->pass) - { - $this->pass = md5($this->pass); - } + $this->pass = md5($this->pass); } else { $this->pass=trim($this->pass); } + $this->email=trim($this->email); $this->note=trim($this->note); $this->admin=$this->admin?$this->admin:0;