Function __global->cms_ldap_escape

Definitions

sources/cns_ldap.php

  • Escape, ready for an LDAP query.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$str string No No required parameter N/A N/A The value
$for_dn boolean No No False N/A N/A Whether this is for use in a DN string

Returns

  • The escaped value
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Escape, ready for an LDAP query.
 *
 * @param  string $str The value
 * @param  boolean $for_dn Whether this is for use in a DN string
 * @return string The escaped value
 */

function cms_ldap_escape(string $str, bool $for_dn = false) : string