From 2c4429a805cfc8fcdef699ac2dc3f2f8732b7616 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be>
Date: Tue, 18 Sep 2018 10:39:06 +0200
Subject: [PATCH] :ambulance: fix(users) Fix password editing

Because of a format problem the users were locked when the password was
 changed.

issue #3710
---
 plugins/personal/generic/class_UserPasswordAttribute.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/personal/generic/class_UserPasswordAttribute.inc b/plugins/personal/generic/class_UserPasswordAttribute.inc
index 220db5933..129dd0d8f 100644
--- a/plugins/personal/generic/class_UserPasswordAttribute.inc
+++ b/plugins/personal/generic/class_UserPasswordAttribute.inc
@@ -198,6 +198,7 @@ class UserPasswordAttribute extends CompositeAttribute
     } elseif ($this->plugin->initially_was_account) {
       $pw_storage = 'empty';
     }
+    $locked = ($locked ? 'TRUE' : 'FALSE');
     return array($pw_storage, $password, $password, $value, $locked);
   }
 
@@ -225,7 +226,6 @@ class UserPasswordAttribute extends CompositeAttribute
 
   function check()
   {
-    $method = $this->attributes[0]->getValue();
     $error = parent::check();
     if (!empty($error)) {
       return $error;
-- 
GitLab