getLdapGroupPattern($input)); } catch (LdapException $e) { $this->logger->error($e->getMessage()); return array(); } } /** * Get LDAP group pattern * * @access public * @param string $input * @param string $filter * @return string */ public function getLdapGroupPattern($input, $filter = LDAP_GROUP_FILTER) { if ($filter === '') { throw new LogicException('LDAP group filter is empty. Please configure the LDAP_GROUP_FILTER parameter in your configuration file'); } $escapedInput = ldap_escape($input, '', LDAP_ESCAPE_FILTER); return sprintf($filter, $escapedInput); } }