From 48eb87f172ddb91517cac95557d90742f79d2d6e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org>
Date: Thu, 7 May 2020 09:19:02 +0200
Subject: [PATCH] :ambulance: fix(ppolicy) Adapt code to config var change

Ppolicy plugin now stores the full dn of the default ppolicy instead of
 only the cn.

issue #6093
---
 plugins/personal/generic/class_user.inc | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc
index 3ddbaf96e..0d9c9928e 100644
--- a/plugins/personal/generic/class_user.inc
+++ b/plugins/personal/generic/class_user.inc
@@ -419,10 +419,7 @@ class user extends simplePlugin
     if (isset($attrs['pwdPolicySubentry'][0])) {
       $ppolicydn = $attrs['pwdPolicySubentry'][0];
     } else {
-      $ppolicydn = $config->get_cfg_value('ppolicyDefaultCn', '');
-      if (!empty($ppolicydn)) {
-        $ppolicydn = 'cn='.$ppolicydn.','.get_ou('ppolicyRDN').$config->current['BASE'];
-      }
+      $ppolicydn = $config->get_cfg_value('ppolicyDefaultDn', '');
     }
 
     $policy = NULL;
-- 
GitLab