From 4b30e32dba3a53f02f2c5b5360ed73d1a023a5df Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Mon, 7 Jan 2019 23:20:39 +0100 Subject: fix user update --- app/class/controlleruser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/class/controlleruser.php') 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']); -- cgit v1.2.3