From e0ba8a81fe11930ae2452de7196ce2dca08519dc Mon Sep 17 00:00:00 2001 From: F TEMPEZ Date: Wed, 8 Nov 2023 09:50:39 +0100 Subject: [PATCH] =?UTF-8?q?for=C3=A7age=20de=20mot=20de=20passe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/user/user.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/module/user/user.php b/core/module/user/user.php index 96e64040..63221a7a 100644 --- a/core/module/user/user.php +++ b/core/module/user/user.php @@ -288,7 +288,7 @@ class user extends common } } else { if ($this->getInput('userEditNewPassword') === $this->getInput('userEditConfirmPassword')) { - $newPassword = $this->getInput('userEditNewPassword', helper::FILTER_PASSWORD, true); + $newPassword = $this->getInput('userEditNewPassword', helper::FILTER_PASSWORD); // Déconnexion de l'utilisateur si il change le mot de passe de son propre compte if ($this->getUser('id') === $this->getUrl(2)) { helper::deleteCookie('ZWII_USER_ID'); @@ -332,7 +332,7 @@ class user extends common 'pseudo' => $this->getInput('userEditPseudo', helper::FILTER_STRING_SHORT, true), 'signature' => $this->getInput('userEditSignature', helper::FILTER_INT, true), 'mail' => $this->getInput('userEditMail', helper::FILTER_MAIL, true), - 'password' => $newPassword, + 'password' => $newPassword ? $newPassword : $this->getData(['user', $this->getUrl(2)], 'password'), 'connectFail' => $this->getData(['user', $this->getUrl(2), 'connectFail']), 'connectTimeout' => $this->getData(['user', $this->getUrl(2), 'connectTimeout']), 'accessUrl' => $this->getData(['user', $this->getUrl(2), 'accessUrl']),