LDAP
[ class tree: LDAP ] [ index: LDAP ] [ all elements ]

Class: Ldap

Source Location: /lib/ldap.inc

Class Overview


Ldap manages connection to LDAP and includes several helper functions.


Variables

Methods



Class Details

[line 52]
Ldap manages connection to LDAP and includes several helper functions.



[ Top ]


Class Variables

$attributes =

[line 68]

Array with all attribute strings from the LDAP server


Type:   mixed


[ Top ]

$conf =

[line 55]

Object of Config to access preferences


Type:   mixed


[ Top ]

$objectClasses =

[line 66]

Array with all objectClass strings from the LDAP server


Type:   mixed


[ Top ]

$password =

[line 63]

LDAP password used for bind


Type:   mixed


[ Top ]

$rand =

[line 79]

Random number (changes on every page request)


Type:   mixed


[ Top ]

$server =

[line 58]

Server handle


Type:   mixed


[ Top ]

$supports_samba2_schema =  false

[line 74]

ObjectClass sambaAccount


Type:   mixed


[ Top ]

$supports_samba3_schema =  false

[line 76]

ObjectClass sambaSamAccount


Type:   mixed


[ Top ]

$supports_unix_hosts =  false

[line 72]

Host attribute in inetOrgPerson


Type:   mixed


[ Top ]

$username =

[line 61]

LDAP username used for bind


Type:   mixed


[ Top ]



Class Methods


constructor Ldap [line 84]

Ldap Ldap( object $config)



Parameters:

object   $config   an object of class Config

[ Top ]

method close [line 146]

void close( )

Closes connection to server



[ Top ]

method cmp_array [line 434]

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 100]

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 377]

string decrypt( object $data)

Decrypts a string



Tags:

return:  decrypted string


Parameters:

object   $data   string to decrypt

[ Top ]

method decrypt_login [line 411]

array decrypt_login( )

Decrypts username and password



Tags:

return:  array(user name, password)


[ Top ]

method destroy [line 420]

void destroy( )

Closes connection to LDAP server and deletes encrypted username/password



[ Top ]

method encrypt [line 356]

object encrypted encrypt( string $data)

Encrypts a string



Tags:

return:  string


Parameters:

string   $data   string to encrypt

[ Top ]

method encrypt_login [line 400]

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 342]

int new_rand( )

Calculates a new value for rand



Tags:

return:  New random value


[ Top ]

method search_units [line 156]

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 301]

object connection server( )

Returns the LDAP connection handle



Tags:

return:  handle


[ Top ]

method updateCapabilities [line 286]

void updateCapabilities( )

Updates the capabilities values (var $supports_*)



[ Top ]

method updateClasses [line 183]

void updateClasses( )

Reads the array of objectClasses from the LDAP server



[ Top ]

method __sleep [line 306]

void __sleep( )

Closes connection to LDAP server before serialization



[ Top ]

method __wakeup [line 314]

void __wakeup( )

Reconnects to LDAP server when deserialized



[ Top ]


Documentation generated on Tue, 07 Feb 2006 17:03:46 +0100 by phpDocumentor 1.2.3