Verified Commit 333d61e8 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

🚑 fix(ppolicy) Fix other references to fdPpolicyDefaultCn

issue #6044
parent 83e73b54
......@@ -76,9 +76,8 @@ class dashboardPpolicy extends simplePlugin
$ldap = $config->get_ldap_link();
$defaultMaxAge = NULL;
$ppolicydn = $config->get_cfg_value('ppolicyDefaultCn', '');
$ppolicydn = $config->get_cfg_value('ppolicyDefaultDn', '');
if (!empty($ppolicydn)) {
$ppolicydn = 'cn='.$ppolicydn.','.get_ou('ppolicyRDN').$config->current['BASE'];
$ldap->cat($ppolicydn, ['pwdMaxAge']);
$policy = $ldap->fetch();
if (!$policy) {
......
......@@ -189,10 +189,5 @@ class ppolicy extends simplePlugin
]
]
);
if (objects::count('ppolicy') == 0) {
$this->attributesAccess['cn']->setDefaultValue($config->get_cfg_value('ppolicyDefaultCn', 'default'));
$this->attributesAccess['cn']->resetToDefault();
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment