aboutsummaryrefslogtreecommitdiff
path: root/app/class/controlleruser.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2019-01-07 23:20:39 +0100
committervincent-peugnet <v.peugnet@free.fr>2019-01-07 23:20:39 +0100
commit4b30e32dba3a53f02f2c5b5360ed73d1a023a5df (patch)
tree4ce6980590b9eb1833330991b1c5f17f58842beb /app/class/controlleruser.php
parent65ee79c41b0f980e312af67b0f9e5ee5770eed8d (diff)
downloadwcms-4b30e32dba3a53f02f2c5b5360ed73d1a023a5df.tar.gz
wcms-4b30e32dba3a53f02f2c5b5360ed73d1a023a5df.zip
fix user update
Diffstat (limited to 'app/class/controlleruser.php')
-rw-r--r--app/class/controlleruser.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/class/controlleruser.php b/app/class/controlleruser.php
index 792877d..7863956 100644
--- a/app/class/controlleruser.php
+++ b/app/class/controlleruser.php
@@ -61,7 +61,7 @@ class Controlleruser extends Controller
$user->hydrate($_POST);
if(empty($user->id())) {
$this->routedirectget('user', ['error' => 'wrong_id']);
- } elseif (empty($user->password()) | $this->usermanager->passwordexist($user->password())) {
+ } elseif (!empty($_POST['password']) && (empty($user->password()) || $this->usermanager->passwordexist($user->password()))) {
$this->routedirectget('user', ['error' => 'change_password']);
} elseif (empty($user->level())) {
$this->routedirectget('user', ['error' => 'wrong_level']);