Project

General

Profile

Helpers

Ltool

basedn()

Returns the basedn specified in the ldap config

escape($str,$all = FALSE)

Escapes LDAP filter strings according to RFC2254
By default it does not escape the '*' character to keep wildcard search support.

Arguments:
  1. String $str: The string to escape
  2. Boolean $all (false): Set this to true to also escape the wildcard character '*'

Examples:

echo Ltool:: escape('(attribute=\abc*)');
// (attribute=\5cabc*)

echo Ltool:: escape('(attribute=\abc*)',TRUE);
// (attribute=\5cabc\2A)

Also available in: PDF HTML TXT