Lines Matching defs:filter

26     /* @var array $pattern User filter pattern */
198 $filter = $this->makeFilter($this->getConf('userfilter'), $info);
200 $filter = "(ObjectClass=*)";
203 $this->debug('LDAP Filter: ' . hsc($filter), 0, __LINE__, __FILE__);
206 $this->debug('LDAP search at: ' . hsc($base . ' ' . $filter), 0, __LINE__, __FILE__);
207 $sr = $this->ldapSearch($this->con, $base, $filter, $this->getConf('userscope'), $this->getConf('attributes'));
275 $filter = $this->makeFilter($this->getConf('groupfilter'), $user_result);
279 $filter,
284 $this->debug('LDAP search at: ' . hsc($base . ' ' . $filter), 0, __LINE__, __FILE__);
400 * @param array $filter array of field/pattern pairs, null for no filter
404 public function retrieveUsers($start = 0, $limit = 0, $filter = [])
429 $this->constructPattern($filter);
439 if ($this->filter($user, $info)) {
448 * Make LDAP filter strings.
450 * Used by auth_getUserData to make the filter
453 * @param string $filter ldap search filter with placeholders
458 protected function makeFilter($filter, $placeholders)
460 preg_match_all("/%{([^}]+)/", $filter, $matches, PREG_PATTERN_ORDER);
470 $filter = str_replace('%{' . $match . '}', $value, $filter);
472 return $filter;
476 * return true if $user + $info match $filter criteria, false otherwise
484 protected function filter($user, $info)
499 * Set the filter pattern
501 * @param $filter
506 protected function constructPattern($filter)
509 foreach ($filter as $item => $pattern) {
515 * Escape a string to be used in a LDAP filter
640 * @param string $filter
651 $filter,
663 $filter,
672 $filter,
681 $filter,