aboutsummaryrefslogtreecommitdiff
path: root/app/class/controlleruser.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2019-01-11 18:09:55 +0100
committervincent-peugnet <v.peugnet@free.fr>2019-01-11 18:09:55 +0100
commitb361e2e5d5bdb6cc6256d50f8292c910fc4d3de0 (patch)
tree250098c63c3f5442a738beec206ff3776683ea3e /app/class/controlleruser.php
parentc5a9c71a1fbade72f35b5d39c5f71380436e96ce (diff)
downloadwcms-b361e2e5d5bdb6cc6256d50f8292c910fc4d3de0.tar.gz
wcms-b361e2e5d5bdb6cc6256d50f8292c910fc4d3de0.zip
user hash fix update
Diffstat (limited to 'app/class/controlleruser.php')
-rw-r--r--app/class/controlleruser.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/class/controlleruser.php b/app/class/controlleruser.php
index 8240d55..65fb2bc 100644
--- a/app/class/controlleruser.php
+++ b/app/class/controlleruser.php
@@ -72,6 +72,9 @@ class Controlleruser extends Controller
} elseif ($user->level() === 10 && $userupdate->level() !== 10 && $this->user->id() === $user->id()) {
$this->routedirectget('user', ['error' => 'cant_edit_yourself']);
} else {
+ if($userupdate->password() !== $user->password() && $user->passwordhashed()) {
+ $userupdate->setpasswordhashed(false);
+ }
if($userupdate->passwordhashed() && !$user->passwordhashed()) {
$userupdate->hashpassword();
}