LDAP

# Class: Ldap Source Location: /lib/ldap.inc
### Class Overview
Ldap manages connection to LDAP and includes several helper functions. | ### Methods __construct close connect decrypt decrypt_login destroy encrypt encrypt_login new_rand server __sleep __wakeup
### Class Details [line 50] Ldap manages connection to LDAP and includes several helper functions. [ Top ] ### Class Methods ### static method decrypt [line 219]
`static string decrypt( object $data, [string $prefix = ''])`
Decrypts a string #### Tags:
return: | decrypted string
access: | public
#### Parameters:
object | $data | string to decrypt
string | $prefix | prefix for cookie names
[ Top ] ### static method encrypt [line 192]
`static object encrypted encrypt( string $data, [string $prefix = ''])`
Encrypts a string #### Tags:
return: | string
access: | public
#### Parameters:
string | $data | string to encrypt
string | $prefix | prefix for cookie names
[ Top ] ### constructor __construct [line 71]
`Ldap __construct( object $config)`
#### Parameters:
object | $config | an object of class Config
[ Top ] ### method close [line 124]
`void close( )`
Closes connection to server [ Top ] ### method connect [line 88]
`mixed connect( string $user, string $passwd, [boolean $allowAnonymous = false])`
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
boolean | $allowAnonymous | specifies if anonymous binds are allowed
[ Top ] ### method decrypt_login [line 258]
`array decrypt_login( )`
Decrypts username and password #### Tags:
return: | array(user name, password)
[ Top ] ### method destroy [line 267]
`void destroy( )`
Closes connection to LDAP server and deletes encrypted username/password [ Top ] ### method encrypt_login [line 247]
`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 177]
`int new_rand( )`
Calculates a new value for rand #### Tags:
return: | New random value
[ Top ] ### method server [line 133]
`object connection server( )`
Returns the LDAP connection handle #### Tags:
return: | handle
[ Top ] ### method __sleep [line 143]
`void __sleep( )`
Closes connection to LDAP server before serialization [ Top ] ### method __wakeup [line 150]
`void __wakeup( )`
Reconnects to LDAP server when deserialized [ Top ] Documentation generated on Tue, 22 Nov 2011 16:29:54 +0100 by phpDocumentor 1.4.1