diff --git a/include/class_config.inc b/include/class_config.inc index 025e689e435b68c01cc506f234f1f0623980df3a..e569a72a8b38344a08dbe403d0bb1447f7a0c9a0 100755 --- a/include/class_config.inc +++ b/include/class_config.inc @@ -115,8 +115,13 @@ class config $this->referrals = $data['referrals']; $this->data = $data['data']; + // We reset the value of hooks (avoiding duplication). + $this->data['HOOKS'] = []; + // Recreate the XML parser $this->parser = xml_parser_create(); + // Update config from backend + $this->load_inldap_config(); } /*! @@ -834,7 +839,7 @@ class config { $class = strtoupper((string) $class); $value = strtoupper((string) $value); - return (isset($this->data['HOOKS'][$class][$value]) ? $this->data['HOOKS'][$class][$value] : []); + return ($this->data['HOOKS'][$class][$value] ?? []); } /*! diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 9a45802e46b810df0b03b193137090e555000158..04979e1b5baeda37fc9abba2f61a4857e69dc603 100755 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -261,8 +261,7 @@ class user extends simplePlugin function __construct ($dn = NULL, $object = NULL, $parent = NULL, $mainTab = FALSE) { global $config; - // Force to read ldap configuration saved in LDAP in case config is not up to date. - $config->load_inldap_config(); + parent::__construct($dn, $object, $parent, $mainTab); // verify if the attribute password is locked