LDAP

# Class: Ldap Source Location: /lib/ldap.inc
### Class Overview
Ldap manages connection to LDAP and includes several helper functions. | ### Variables $supports_unix_hosts | ### Methods Ldap close cmp_array connect decrypt decrypt_login destroy encrypt encrypt_login new_rand search_units server updateCapabilities updateClasses __sleep __wakeup
### Class Details [line 52] Ldap manages connection to LDAP and includes several helper functions. [ Top ] ### Class Variables #### $supports_unix_hosts = false [line 74] Host attribute in inetOrgPerson #### Tags:
access: | public
Type: | mixed
[ Top ] ### Class Methods ### constructor Ldap [line 82]
`Ldap Ldap( object $config)`
#### Parameters:
object | $config | an object of class Config
[ Top ] ### method close [line 144]
`void close( )`
Closes connection to server [ Top ] ### method cmp_array [line 440]
`integer cmp_array( string $a, string $b)`
Helper function to sort the unit DNs #### Tags:
return: | 0 if equal, 1 if $a is greater, -1 if $b is greater
#### Parameters:
string | $a | first argument to compare
string | $b | second argument to compare
[ Top ] ### method connect [line 98]
`mixed connect( string $user, string $passwd)`
Connects to the server using the given username and password #### Tags:
return: | if connect succeeds the server handle is returned, else false
#### Parameters:
string | $user | user name
string | $passwd | password
[ Top ] ### method decrypt [line 381]
`string decrypt( object $data)`
Decrypts a string #### Tags:
return: | decrypted string
#### Parameters:
object | $data | string to decrypt
[ Top ] ### method decrypt_login [line 417]
`array decrypt_login( )`
Decrypts username and password #### Tags:
return: | array(user name, password)
[ Top ] ### method destroy [line 426]
`void destroy( )`
Closes connection to LDAP server and deletes encrypted username/password [ Top ] ### method encrypt [line 358]
`object encrypted encrypt( string $data)`
Encrypts a string #### Tags:
return: | string
#### Parameters:
string | $data | string to encrypt
[ Top ] ### method encrypt_login [line 406]
`void encrypt_login( string $username, string $password)`
Encrypts username and password #### Parameters:
string | $username | LDAP user name
string | $password | LDAP password
[ Top ] ### method new_rand [line 344]
`int new_rand( )`
Calculates a new value for rand #### Tags:
return: | New random value
[ Top ] ### method search_units [line 154]
`array search_units( string $suffix)`
Returns an array with all organizational units under the given suffix #### Tags:
return: | DNs of organizational units
#### Parameters:
string | $suffix | search suffix
[ Top ] ### method server [line 297]
`object connection server( )`
Returns the LDAP connection handle #### Tags:
return: | handle
[ Top ] ### method updateCapabilities [line 284]
`void updateCapabilities( )`
Updates the capabilities values (var $supports_*) [ Top ] ### method updateClasses [line 181]
`void updateClasses( )`
Reads the array of objectClasses from the LDAP server [ Top ] ### method __sleep [line 307]
`void __sleep( )`
Closes connection to LDAP server before serialization [ Top ] ### method __wakeup [line 315]
`void __wakeup( )`
Reconnects to LDAP server when deserialized [ Top ] Documentation generated on Sun, 04 Nov 2007 12:10:54 +0100 by phpDocumentor 1.4.0