Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe LdapClient

Fonctions membres publiques

 __construct ($configObj=null)
 
 __destruct ()
 
 connect ()
 
 close ()
 
 setDn ($username, $nosub=0)
 
 getDn ()
 
 anonymous_bind ()
 
 bind ($username=null, $password=null, $nosub=0)
 
 unbind ()
 
 simple_search ($search)
 
 search (array $filters, $dnoverride=null, array $attributes=array())
 
 replace ($dn, $attribute)
 
 modify ($dn, $attribute)
 
 remove ($dn, $attribute)
 
 compare ($dn, $attribute, $value)
 
 read ($dn)
 
 delete ($dn)
 
 create ($dn, array $entries)
 
 add ($dn, array $entry)
 
 rename ($dn, $newdn, $newparent, $deleteolddn)
 
 escape ($value, $ignore='', $flags=0)
 
 getErrorMsg ()
 
 isConnected ()
 

Fonctions membres publiques statiques

static ipToNetAddress ($ip)
 
static ldapNetAddr ($networkaddress)
 
static generatePassword ($password, $type='md5')
 

Champs de données

 $host
 
 $auth_method
 
 $port
 
 $base_dn
 
 $users_dn
 
 $search_string
 
 $use_ldapV3
 
 $no_referrals
 
 $negotiate_tls
 
 $ignore_reqcert_tls
 
 $ldap_debug
 
 $username
 
 $password
 

Attributs privés

 $resource
 
 $dn
 
 $isBound = false
 

Description détaillée

LDAP client class

Depuis
1.0
Obsolète:
The joomla/ldap package is deprecated

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $configObj = null)

Constructor

Paramètres
object$configObjAn object of configuration variables
Depuis
1.0

Références $param.

◆ __destruct()

__destruct ( )

Class destructor.

Depuis
1.3.0

Références LdapClient\close().

Documentation des fonctions membres

◆ add()

add (   $dn,
array  $entry 
)

Add attribute values to current attributes

Paramètres
string$dnThe DN of the entry to add the attribute
array$entryAn array of arrays with attributes to add
Renvoie
boolean
Depuis
1.0

Références LdapClient\$dn, et LdapClient\isConnected().

◆ anonymous_bind()

anonymous_bind ( )

Anonymously binds to LDAP directory

Renvoie
boolean
Depuis
1.0

Références LdapClient\$isBound, LdapClient\connect(), et LdapClient\isConnected().

◆ bind()

bind (   $username = null,
  $password = null,
  $nosub = 0 
)

Binds to the LDAP directory

Paramètres
string$usernameThe username
string$passwordThe password
string$nosub...
Renvoie
boolean
Depuis
1.0

Références LdapClient\$isBound, LdapClient\$password, LdapClient\$username, LdapClient\connect(), LdapClient\getDn(), LdapClient\isConnected(), null, et LdapClient\setDn().

◆ close()

close ( )

Close the connection

Renvoie
void
Depuis
1.0

Références LdapClient\isConnected(), null, et LdapClient\unbind().

Référencé par LdapClient\__destruct().

◆ compare()

compare (   $dn,
  $attribute,
  $value 
)

Compare value of attribute found in entry specified with DN

Paramètres
string$dnThe DN which contains the attribute you want to compare
string$attributeThe attribute whose value you want to compare
string$valueThe value you want to check against the LDAP attribute
Renvoie
boolean|integer Boolean result of the comparison or -1 on error
Depuis
1.0

Références LdapClient\$dn, $value, et LdapClient\isConnected().

◆ connect()

connect ( )

Connect to an LDAP server

Renvoie
boolean
Depuis
1.0

Références null.

Référencé par LdapClient\anonymous_bind(), et LdapClient\bind().

◆ create()

create (   $dn,
array  $entries 
)

Add entries to LDAP directory

Paramètres
string$dnThe DN where you want to put the object
array$entriesAn array of arrays describing the object to add
Renvoie
boolean
Depuis
1.0

Références LdapClient\$dn, et LdapClient\isConnected().

◆ delete()

delete (   $dn)

Delete an entry from a directory

Paramètres
string$dnThe DN of the object you want to delete
Renvoie
boolean
Depuis
1.0

Références LdapClient\$dn, et LdapClient\isConnected().

◆ escape()

escape (   $value,
  $ignore = '',
  $flags = 0 
)

Escape a string

Paramètres
string$valueThe subject string
string$ignoreCharacters to ignore when escaping.
integer$flagsThe context the escaped string will be used in LDAP_ESCAPE_FILTER or LDAP_ESCAPE_DN
Renvoie
string
Depuis
1.2.0

Références $value.

◆ generatePassword()

static generatePassword (   $password,
  $type = 'md5' 
)
static

Generates a LDAP compatible password

Paramètres
string$passwordClear text password to encrypt
string$typeType of password hash, either md5 or SHA
Renvoie
string
Depuis
1.0

Références LdapClient\$password, et $type.

◆ getDn()

getDn ( )

Get the configured DN

Renvoie
string
Depuis
1.0

Références LdapClient\$dn.

Référencé par LdapClient\bind().

◆ getErrorMsg()

getErrorMsg ( )

Return the LDAP error message of the last LDAP command

Renvoie
string
Depuis
1.0

Références LdapClient\isConnected().

◆ ipToNetAddress()

static ipToNetAddress (   $ip)
static

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

Paramètres
string$ipIP Address (e.g. xxx.xxx.xxx.xxx)
Renvoie
string
Depuis
1.0

Références $parts, et $tmp.

◆ isConnected()

◆ ldapNetAddr()

static ldapNetAddr (   $networkaddress)
static

Extract readable network address from the LDAP encoded networkAddress attribute.

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

Paramètres
string$networkaddressThe network address
Renvoie
array
Auteur
Jay Burrell, Systems & Networks, Mississippi State University
Depuis
1.0

Références $i.

◆ modify()

modify (   $dn,
  $attribute 
)

Modify an LDAP entry

Paramètres
string$dnThe DN which contains the attribute you want to modify
string$attributeThe attribute values you want to modify
Renvoie
boolean
Depuis
1.0

Références LdapClient\$dn, et LdapClient\isConnected().

◆ read()

read (   $dn)

Read attributes of a given DN

Paramètres
string$dnThe DN of the object you want to read
Renvoie
array|boolean Array of attributes for the given DN or boolean false on failure
Depuis
1.0

Références $base, LdapClient\$dn, et LdapClient\isConnected().

◆ remove()

remove (   $dn,
  $attribute 
)

Delete attribute values from current attributes

Paramètres
string$dnThe DN which contains the attribute you want to remove
string$attributeThe attribute values you want to remove
Renvoie
boolean
Depuis
1.0

Références LdapClient\$dn, et LdapClient\isConnected().

◆ rename()

rename (   $dn,
  $newdn,
  $newparent,
  $deleteolddn 
)

Modify the name of an entry

Paramètres
string$dnThe DN of the entry at the moment
string$newdnThe DN of the entry should be (only cn=newvalue)
string$newparentThe full DN of the parent (null by default)
boolean$deleteolddnDelete the old values (default)
Renvoie
boolean
Depuis
1.0

Références LdapClient\$dn, et LdapClient\isConnected().

◆ replace()

replace (   $dn,
  $attribute 
)

Replace attribute values with new ones

Paramètres
string$dnThe DN which contains the attribute you want to replace
string$attributeThe attribute values you want to replace
Renvoie
boolean
Depuis
1.0

Références LdapClient\$dn, et LdapClient\isConnected().

◆ search()

search ( array  $filters,
  $dnoverride = null,
array  $attributes = array() 
)

Performs an LDAP search

Paramètres
array$filtersSearch Filters (array of strings)
string$dnoverrideDN Override
array$attributesAn array of attributes to return (if empty, all fields are returned).
Renvoie
array Multidimensional array of results
Depuis
1.0

Références $attributes, LdapClient\$base_dn, $count, LdapClient\$dn, $filters, $i, et LdapClient\isConnected().

Référencé par PlgAuthenticationLdap\searchByString(), et LdapClient\simple_search().

◆ setDn()

setDn (   $username,
  $nosub = 0 
)

Sets the DN with some template replacements

Paramètres
string$usernameThe username
string$nosub...
Renvoie
void
Depuis
1.0

Références LdapClient\$username, et elseif.

Référencé par LdapClient\bind().

◆ simple_search()

simple_search (   $search)

Perform an LDAP search using comma separated search strings

Paramètres
string$searchsearch string of search values
Renvoie
array Search results
Depuis
1.0

Références $key, $results, et LdapClient\search().

◆ unbind()

unbind ( )

Unbinds from the LDAP directory

Renvoie
boolean
Depuis
1.3.0

Référencé par LdapClient\close().

Documentation des champs

◆ $auth_method

$auth_method

◆ $base_dn

$base_dn

Référencé par LdapClient\search().

◆ $dn

◆ $host

$host

◆ $ignore_reqcert_tls

$ignore_reqcert_tls

◆ $isBound

$isBound = false
private

◆ $ldap_debug

$ldap_debug

◆ $negotiate_tls

$negotiate_tls

◆ $no_referrals

$no_referrals

◆ $password

$password

◆ $port

$port

◆ $resource

$resource
private

◆ $search_string

$search_string

◆ $use_ldapV3

$use_ldapV3

◆ $username

$username

Référencé par LdapClient\bind(), et LdapClient\setDn().

◆ $users_dn

$users_dn

La documentation de cette classe a été générée à partir du fichier suivant :