Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class JLDAP

Description

LDAP client class

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

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 JLDAP ([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 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 28)
  • var: Authorization Method to use
string $base_dn = null (line 34)
  • var: Base DN (e.g. o=MyDir)
string $host = null (line 25)
  • var: Hostname of LDAP server
boolean $negotiate_tls = null (line 49)
  • var: Negotiate TLS (encrypted communications)
boolean $no_referrals = null (line 46)
  • var: No referrals (server transfers)
string $password = null (line 56)
  • var: Password to connect to server
int $port = null (line 31)
  • var: Port of LDAP server
string $search_string = null (line 40)
  • var: Search String
string $username = null (line 53)
  • var: Username to connect to server
string $users_dn = null (line 37)
  • var: User DN (e.g. cn=Users,o=MyDir)
boolean $use_ldapV3 = null (line 43)
  • var: Use LDAP Version 3
string $_dn = null (line 63)
  • var: Current DN
mixed $_resource = null (line 60)
  • var: LDAP Resource Identifier
Methods
Constructor JLDAP (line 70)

Constructor

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

Anonymously Binds to LDAP Directory

void anonymous_bind ()
bind (line 157)

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

Close the connection

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

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

Connect to server

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

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

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.
void LDAPNetAddr ( $networkaddress)
  • $networkaddress
search (line 189)

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

Sets the DN with some template replacements

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

Perform an LDAP search using comma seperated search strings

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

Documentation generated on Mon, 05 Mar 2007 21:09:25 +0000 by phpDocumentor 1.3.1