Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2008 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5. Some parts of this website may be subject to other licenses.

 Class JLDAP

Description

LDAP client class

Located in /joomla/client/ldap.php (line 22)

Class JObject   (Subpackage Base)

Class JLDAP   (Subpackage Client)
Variable Summary
Variable string $base_dn
Variable string $host
Variable boolean $negotiate_tls
Variable boolean $no_referrals
Variable string $password
Variable int $port
Variable string $username
Variable string $users_dn
Variable boolean $use_ldapV3
Variable string $_dn
Variable mixed $_resource
Method Summary
Constructor JLDAP __construct ([object An $configObj = null])
Method void anonymous_bind ()
Method boolean bind ([string $username = null], [string $password = null], [ $nosub = 0])
Method void close ()
Method mixed compare (string $dn, string $attribute, string $value)
Method boolean connect ()
Method string getDN ()
Method string ipToNetAddress (string $ip)
Method void LDAPNetAddr ( $networkaddress)
Method mixed modify (string $dn, string $attribute)
Method array read (string $dn, [string $attribute = array()])
Method mixed remove (string $dn, string $attribute)
Method mixed replace (string $dn, string $attribute)
Method array search (array $filters, [string $dnoverride = null])
Method void setDN (string $username, [ $nosub = 0])
Method void simple_search (string $search)
Variables
bool $auth_method = null (line 29)
  • var: Authorization Method to use
string $base_dn = null (line 35)
  • var: Base DN (e.g. o=MyDir)
string $host = null (line 26)
  • var: Hostname of LDAP server
boolean $negotiate_tls = null (line 50)
  • var: Negotiate TLS (encrypted communications)
boolean $no_referrals = null (line 47)
  • var: No referrals (server transfers)
string $password = null (line 57)
  • var: Password to connect to server
int $port = null (line 32)
  • var: Port of LDAP server
string $search_string = null (line 41)
  • var: Search String
string $username = null (line 54)
  • var: Username to connect to server
string $users_dn = null (line 38)
  • var: User DN (e.g. cn=Users,o=MyDir)
boolean $use_ldapV3 = null (line 44)
  • var: Use LDAP Version 3
string $_dn = null (line 64)
  • var: Current DN
mixed $_resource = null (line 61)
  • var: LDAP Resource Identifier

Inherited Variables

Inherited from JObject

Variable JObject::$_errors
Methods
Constructor __construct (line 72)

Constructor

  • access: public
JLDAP __construct ([object An $configObj = null])
  • object An $configObj: object of configuration variables

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.
anonymous_bind (line 156)

Anonymously Binds to LDAP Directory

void anonymous_bind ()
bind (line 170)

Binds to the LDAP directory

  • return: Result
  • access: public
boolean bind ([string $username = null], [string $password = null],  $nosub)
  • string $username: The username
  • string $password: The password
  • $nosub
close (line 124)

Close the connection

  • access: public
void close ()
compare (line 296)

Compare an entry and return a true or false result

  • return: result of comparison (true, false, -1 on error)
mixed compare (string $dn, string $attribute, string $value)
  • string $dn: dn The DN which contains the attribute you want to compare
  • string $attribute: attribute The attribute whose value you want to compare
  • string $value: value The value you want to check against the LDAP attribute
connect (line 93)

Connect to server

  • return: True if successful
  • access: public
boolean connect ()
getDN (line 149)
  • return: The current dn
  • access: public
string getDN ()
ipToNetAddress (line 328)

Converts a dot notation IP address to net address (e.g. for Netware, etc)

  • return: Net address
  • access: public
string ipToNetAddress (string $ip)
  • string $ip: IP Address (e.g. xxx.xxx.xxx.xxx)
LDAPNetAddr (line 361)

extract readable network address from the LDAP encoded networkAddress attribute.

  • author:

    Jay Burrell, Systems & Networks, Mississippi State University Please keep this document block and author attribution in place.

    Novell Docs, see: http://developer.novell.com/ndk/doc/ndslib/schm_enu/data/sdk5624.html#sdk5624 for Address types: http://developer.novell.com/ndk/doc/ndslib/index.html?page=/ndk/doc/ndslib/schm_enu/data/sdk4170.html LDAP Format, String: taggedData = uint32String "#" octetstring byte 0 = uint32String = Address Type: 0= IPX Address; 1 = IP Address byte 1 = char = "#" - separator byte 2+ = octetstring - the ordinal value of the address Note: with eDirectory 8.6.2, the IP address (type 1) returns correctly, however, an IPX address does not seem to. eDir 8.7 may correct this. Enhancement made by Merijn van de Schoot: If addresstype is 8 (UDP) or 9 (TCP) do some additional parsing like still returning the IP address TODO: Return an extra value with UDP or TCP portnumber

void LDAPNetAddr ( $networkaddress)
  • $networkaddress
modify (line 271)

Modifies an entry and return a true or false result

  • return: result of comparison (true, false, -1 on error)
mixed modify (string $dn, string $attribute)
  • string $dn: dn The DN which contains the attribute you want to modify
  • string $attribute: attribute The attribute values you want to modify
read (line 307)

Read all or specified attributes of given dn

  • return: of attributes or -1 on error
array read (string $dn, [string $attribute = array()])
  • string $dn: dn The DN of the object you want to read
  • string $attribute: attribute The attribute values you want to read (Optional)
remove (line 282)

Removes attribute value from given dn and return a true or false result

  • return: result of comparison (true, false, -1 on error)
mixed remove (string $dn, string $attribute)
  • string $dn: dn The DN which contains the attribute you want to remove
  • string $attribute: attribute The attribute values you want to remove
replace (line 259)

Replace an entry and return a true or false result

  • return: result of comparison (true, false, -1 on error)
mixed replace (string $dn, string $attribute)
  • string $dn: dn The DN which contains the attribute you want to replace
  • string $attribute: attribute The attribute values you want to replace
search (line 207)

Perform an LDAP search

  • return: Multidimensional array of results
  • access: public
array search (array $filters, [string $dnoverride = null])
  • array $filters: Search Filters (array of strings)
  • string $dnoverride: DN Override
setDN (line 134)

Sets the DN with some template replacements

  • access: public
void setDN (string $username,  $nosub)
  • string $username: The username
  • $nosub
simple_search (line 189)

Perform an LDAP search using comma seperated search strings

void simple_search (string $search)
  • string $search: search string of search values

Inherited Methods

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::getPublicProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::toString()

Documentation generated on Tue, 29 Jan 2008 18:48:09 +0000 by phpDocumentor 1.3.1