diff --git a/setup/inc/hook_config_validate.inc.php b/setup/inc/hook_config_validate.inc.php index 678056cd5d..7b500a6cd5 100644 --- a/setup/inc/hook_config_validate.inc.php +++ b/setup/inc/hook_config_validate.inc.php @@ -148,3 +148,15 @@ } } } + + /** + * Add bracket around the ldap_search_filter, if admin forgot it + * + * @param array $settings + */ + function ldap_search_filter(&$settings) + { + $filter =& $settings['ldap_search_filter']; + + if ($filter && $filter{0} != '(') $filter = '('.$filter.')'; + }