From d49164ea62d176273fa799afa231ba5704ffaf15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org>
Date: Thu, 2 Sep 2021 16:26:58 +0200
Subject: [PATCH] :ambulance: fix(core) Fix userPassword template

Reading of old format when modifiers where in use was broken.

issue #6163
---
 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 c6c938330..819218efc 100644
--- a/plugins/personal/generic/class_UserPasswordAttribute.inc
+++ b/plugins/personal/generic/class_UserPasswordAttribute.inc
@@ -195,7 +195,7 @@ class UserPasswordAttribute extends CompositeAttribute
         $parts = explode('|', $value, 3);
         if ((count($parts) < 3) || !in_array($parts[1], ['TRUE','FALSE'])) {
           /* Old format from FD<1.4 */
-          list($value, $password) = $parts;
+          list($value, $password) = explode('|', $value, 2);
         } else {
           list($pw_storage, $locked, $password) = $parts;
           return [$pw_storage, $password, $password, $this->attributes[3]->getValue(), $locked];
-- 
GitLab