[ 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)

return: array
param: array $groups

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

return: string
param: string $str

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

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

strGuidToHex($strGUID)   X-Ref
No description

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

return: string
param: string $binsid A Binary SID

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

return: string
param: string $hex A hex code

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

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

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

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

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

return: string
param: bool $bool Boolean value

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

return: long $unixTime
param: long $windowsTime