JClientLdap

Extends \Joomla\Ldap\LdapClient

LDAP client class

deprecated
since

12.1

deprecated

4.0 Use Joomla\Ldap\LdapClient instead

package

Joomla.Platform

Methods

__construct

Constructor

__construct(object $configObj = null) 
inherited
since

1.0

Arguments

$configObj

objectAn object of configuration variables

add

Add an attribute to the given DN Note: DN has to exist already

add(string $dn, array $entry) : boolean
inherited
since

1.0

Arguments

$dn

stringThe DN of the entry to add the attribute

$entry

arrayAn array of arrays with attributes to add

Response

booleanResult of operation

anonymous_bind

Anonymously binds to LDAP directory

anonymous_bind() : array
inherited
since

1.0

Response

array

bind

Binds to the LDAP directory

bind(string $username = null, string $password = null, string $nosub) : boolean
inherited
since

1.0

Arguments

$username

stringThe username

$password

stringThe password

$nosub

string...

Response

boolean

close

Close the connection

close() : void
inherited
since

1.0

compare

Compare an entry and return a true or false result

compare(string $dn, string $attribute, string $value) : mixed
inherited
since

1.0

Arguments

$dn

stringThe DN which contains the attribute you want to compare

$attribute

stringThe attribute whose value you want to compare

$value

stringThe value you want to check against the LDAP attribute

Response

mixedresult of comparison (true, false, -1 on error)

connect

Connect to server

connect() : boolean
inherited
since

1.0

Response

booleanTrue if successful

create

Create a new DN

create(string $dn, array $entries) : boolean
inherited
since

1.0

Arguments

$dn

stringThe DN where you want to put the object

$entries

arrayAn array of arrays describing the object to add

Response

booleanResult of operation

delete

Deletes a given DN from the tree

delete(string $dn) : boolean
inherited
since

1.0

Arguments

$dn

stringThe DN of the object you want to delete

Response

booleanResult of operation

generatePassword

Generates a LDAP compatible password

generatePassword(string $password, string $type = 'md5') : string
inherited static
since

1.0

Arguments

$password

stringClear text password to encrypt

$type

stringType of password hash, either md5 or SHA

Response

stringEncrypted password

getDN

Get the DN

getDN() : string
inherited
since

1.0

Response

stringThe current dn

getErrorMsg

Returns the error message

getErrorMsg() : string
inherited
since

1.0

Response

stringerror message

ipToNetAddress

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

ipToNetAddress(string $ip) : string
inherited static
since

1.0

Arguments

$ip

stringIP Address (e.g. xxx.xxx.xxx.xxx)

Response

stringNet address

LDAPNetAddr

Extract readable network address from the LDAP encoded networkAddress attribute.

LDAPNetAddr(string $networkaddress) : array
inherited static

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

author

Jay Burrell, Systems & Networks, Mississippi State University

since

1.0

Arguments

$networkaddress

stringThe network address

Response

array

modify

Modifies an entry and return a true or false result

modify(string $dn, string $attribute) : mixed
inherited
since

1.0

Arguments

$dn

stringThe DN which contains the attribute you want to modify

$attribute

stringThe attribute values you want to modify

Response

mixedresult of comparison (true, false, -1 on error)

read

Read all or specified attributes of given dn

read(string $dn) : mixed
inherited
since

1.0

Arguments

$dn

stringThe DN of the object you want to read

Response

mixedarray of attributes or -1 on error

remove

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

remove(string $dn, string $attribute) : mixed
inherited
since

1.0

Arguments

$dn

stringThe DN which contains the attribute you want to remove

$attribute

stringThe attribute values you want to remove

Response

mixedresult of comparison (true, false, -1 on error)

rename

Rename the entry

rename(string $dn, string $newdn, string $newparent, boolean $deleteolddn) : boolean
inherited
since

1.0

Arguments

$dn

stringThe DN of the entry at the moment

$newdn

stringThe DN of the entry should be (only cn=newvalue)

$newparent

stringThe full DN of the parent (null by default)

$deleteolddn

booleanDelete the old values (default)

Response

booleanResult of operation

replace

Replace an entry and return a true or false result

replace(string $dn, string $attribute) : mixed
inherited
since

1.0

Arguments

$dn

stringThe DN which contains the attribute you want to replace

$attribute

stringThe attribute values you want to replace

Response

mixedresult of comparison (true, false, -1 on error)

setDN

Sets the DN with some template replacements

setDN(string $username, string $nosub) : void
inherited
since

1.0

Arguments

$username

stringThe username

$nosub

string...

Properties

host

Hostname of LDAP server

inherited

Type(s)

string

auth_method

Authorization Method to use

inherited

Type(s)

boolean

port

Port of LDAP server

inherited

Type(s)

integer

base_dn

Base DN (e.g. o=MyDir)

inherited

Type(s)

string

users_dn

User DN (e.g. cn=Users,o=MyDir)

inherited

Type(s)

string

search_string

Search String

inherited

Type(s)

string

use_ldapV3

Use LDAP Version 3

inherited

Type(s)

boolean

no_referrals

No referrals (server transfers)

inherited

Type(s)

boolean

negotiate_tls

Negotiate TLS (encrypted communications)

inherited

Type(s)

boolean

username

Username to connect to server

inherited

Type(s)

string

password

Password to connect to server

inherited

Type(s)

string

resource

LDAP Resource Identifier

inherited

Type(s)

mixed

dn

Current DN

inherited

Type(s)

string