[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/lib/plugins/authad/adLDAP/classes/ -> adLDAPUtils.php (summary)

PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY Version 4.0.4 PHP Version 5 with SSL and LDAP support

Author: Scott Barnett, Richard Hyland
Copyright: (c) 2006-2012 Scott Barnett, Richard Hyland
License: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
Link: http://adldap.sourceforge.net/
Version: 4.0.4
File Size: 268 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

adLDAPUtils:: (13 methods):
  __construct()
  niceNames()
  escapeCharacters()
  ldapSlashes()
  strGuidToHex()
  getTextSID()
  littleEndian()
  binaryToText()
  decodeGuid()
  boolToStr()
  encode8Bit()
  getVersion()
  convertWindowsTimeToUnixTime()


Class: adLDAPUtils  - X-Ref

UTILITY FUNCTIONS

__construct(adLDAP $adldap)   X-Ref
The current adLDAP connection via dependency injection


niceNames($groups)   X-Ref
Take an LDAP query and return the nice names, without all the LDAP prefixes (eg. CN, DN)

param: array $groups
return: array

escapeCharacters($str)   X-Ref
Escape characters for use in an ldap_create function

param: string $str
return: string

ldapSlashes($str)   X-Ref
Escape strings for the use in LDAP filters

DEVELOPERS SHOULD BE DOING PROPER FILTERING IF THEY'RE ACCEPTING USER INPUT
Ported from Perl's Net::LDAP::Util escape_filter_value

param: string $str The string the parse
return: string
author: Port by Andreas Gohr <andi@splitbrain.org>

strGuidToHex($strGUID)   X-Ref
No description

getTextSID($binsid)   X-Ref
Convert a binary SID to a text SID

param: string $binsid A Binary SID
return: string

littleEndian($hex)   X-Ref
Converts a little-endian hex number to one that hexdec() can convert

param: string $hex A hex code
return: string

binaryToText($bin)   X-Ref
Converts a binary attribute to a string

param: string $bin A binary LDAP attribute
return: string

decodeGuid($binaryGuid)   X-Ref
Converts a binary GUID to a string GUID

param: string $binaryGuid The binary GUID attribute to convert
return: string

boolToStr($bool)   X-Ref
Convert a boolean value to a string
You should never need to call this yourself

param: bool $bool Boolean value
return: string

encode8Bit(&$item, $key)   X-Ref
Convert 8bit characters e.g. accented characters to UTF8 encoded characters


getVersion()   X-Ref
Get the current class version number

return: string

convertWindowsTimeToUnixTime($windowsTime)   X-Ref
Round a Windows timestamp down to seconds and remove the seconds between 1601-01-01 and 1970-01-01

param: long $windowsTime
return: long $unixTime