application/Espo/Core/Utils/Authentication/LDAP.php
protected function convertToFilterFormat($filter)
    {
        $filter = trim($filter);
        if (substr($filter, 0, 1) != '(') {
            $filter = '(' . $filter;
        }
        if (substr($filter, -1) != ')') {
            $filter = $filter . ')';
        }
        return $filter;
    }
protected function convertToFilterFormat($filter)
    {
        $filter = trim($filter);
        if (substr($filter, 0, 1) != '(') {
            $filter = '(' . $filter;
        }
        if (substr($filter, -1) != ')') {
            $filter = $filter . ')';
        }
        return $filter;
    }
protected function convertToFilterFormat ( $ filter ) { $ filter = trim ( $ filter ) ; if ( substr ( $ filter , 0 , 1 ) != '(' ) { $ filter = '(' . $ filter ; } if ( substr ( $ filter , - 1 ) != ')' ) { $ filter = $ filter . ')' ; } return $ filter ; }
Check and convert filter item into LDAP format

@param  string $filter E.g. "memberof=CN=externalTesters,OU=groups,DC=espo,DC=local"

@return string
Check and convert filter item into LDAP format