Commit a25f99a9 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch...

Merge branch '6044-error-when-creating-entry-if-default-password-policy-is-not-directly-in-ou-ppolicies-dc-domain' into '1.4-dev'

Resolve "Error when creating entry if default password policy is not directly in ou=ppolicies,dc=domain,dc=tld"

See merge request fusiondirectory/fd-plugins!716
parents 83e73b54 333d61e8
......@@ -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