\JClientLdap
LDAP client class
Synopsis
class JClientLdap
{
- // members
- public $host;
- public bool $auth_method;
- public $port;
- public $base_dn;
- public $users_dn;
- public $search_string;
- public $use_ldapV3;
- public $no_referrals;
- public $negotiate_tls;
- public $username;
- public $password;
- private $_resource;
- private $_dn;
- // methods
- public void __construct()
- public boolean connect()
- public void close()
- public void setDN()
- public string getDN()
- public array anonymous_bind()
- public boolean bind()
- public array simple_search()
- public array search()
- public mixed replace()
- public mixed modify()
- public mixed remove()
- public mixed compare()
- public mixed read()
- public boolean delete()
- public boolean create()
- public boolean add()
- public boolean rename()
- public string getErrorMsg()
- public static string ipToNetAddress()
- public static array LDAPNetAddr()
- public static string generatePassword()
Hierarchy
Extended by
Tasks
Tasks
Line | Task |
---|---|
586 | 1.6: If UDP or TCP, (TODO fill addrport and) strip portnumber information from address |
Members
private
- $_dn — string
- $_resource — mixed
public
- $auth_method — bool
- $base_dn — string
- $host — string
- $negotiate_tls — boolean
- $no_referrals — boolean
- $password — string
- $port — int
- $search_string — string
- $use_ldapV3 — boolean
- $username — string
- $users_dn — string
Methods
public
- __construct() — Constructor
- LDAPNetAddr() — Extract readable network address from the LDAP encoded networkAddress attribute.
- add() — Add an attribute to the given DN Note: DN has to exist already
- anonymous_bind() — Anonymously binds to LDAP directory
- bind() — Binds to the LDAP directory
- close() — Close the connection
- compare() — Compare an entry and return a true or false result
- connect() — Connect to server
- create() — Create a new DN
- delete() — Deletes a given DN from the tree
- generatePassword() — Generates a LDAP compatible password
- getDN() — Get the DN
- getErrorMsg() — Returns the error message
- ipToNetAddress() — Converts a dot notation IP address to net address (e.g. for Netware, etc)
- modify() — Modifies an entry and return a true or false result
- read() — Read all or specified attributes of given dn
- remove() — Removes attribute value from given dn and return a true or false result
- rename() — Rename the entry
- replace() — Replace an entry and return a true or false result
- search() — Performs an LDAP search
- setDN() — Sets the DN with some template replacements
- simple_search() — Perform an LDAP search using comma separated search strings