Model class to access an LDAP directories
package |
Framework |
---|---|
subpackage |
LDAP |
__construct(array $p)
array
LDAP connection properties
set_debug(boolean $dbg = true)
boolean
True if LDAP commands should be logged
set_config(mixed $opt, mixed $val = null)
mixed
Option name as string or hash array with multiple options
mixed
Option value
set_cache($cache_engine)
set_vlv_page(\number $page, \number $size = 10)
\number
Page number to list (starting at 1)
\number
Number of entries to display on one page
connect($host = null)
sasl_bind(string $authc, string $pass, string $authz = null) : boolean
string
Authentication user
string
Bind password
string
Autorization user
boolean
True on success, False on error
bind(string $dn, string $pass) : boolean
string
Bind DN
string
Bind password
boolean
True on success, False on error
close()
get_result() : object
object
rcube_ldap_result Result object
get_entry(string $dn) : array
string
Record identifier
array
Hash array
search(string $base_dn, string $filter = '', string $scope = 'sub', array $attrs = array('dn'), array $prop = array(), boolean $count_only = false) : mixed
string
The base DN to query
string
The LDAP filter for search
string
The LDAP scope (list|sub|base)
array
List of entry attributes to read
array
Hash array with query configuration properties:
boolean
Set to true if only entry count is requested
mixed
rcube_ldap_result object or number of entries (if count_only=true) or false on error
modify(string $dn, $parms, int $mode = 255)
string
Entry DN
int
Update mode (UPDATE_MOD_ADD | UPDATE_MOD_DELETE | UPDATE_MOD_REPLACE)
add($dn, $entry)
see | \ldap_add() |
---|---|
delete($dn)
see | \ldap_delete() |
---|---|
mod_replace($dn, $entry)
see | \ldap_mod_replace() |
---|---|
mod_add($dn, $entry)
see | \ldap_mod_add() |
---|---|
mod_del($dn, $entry)
see | \ldap_mod_del() |
---|---|
rename($dn, $newrdn, $newparent = null, $deleteoldrdn = true)
see | \ldap_rename() |
---|---|
list_entries($dn, $filter, $attributes = array('dn'))
see | \ldap_list() \ldap_get_entries() |
---|---|
read_entries($dn, $filter, $attributes = null)
see | \ldap_read() \ldap_get_entries() |
---|---|
scope2func(string $scope, string &$ns_function = null) : string
string
The LDAP scope (sub|base|list)
string
Function to be used for numSubOrdinates queries
string
PHP function to be used to query directory
scopeint2str($scope)
escape_value(string $val) : string
string
Value to quote
string
The escaped value
escape_dn(string $dn) : string
string
DN value o quote
string
The escaped value
normalize_result(array $result) : array
array
LDAP result set fetched with ldap_get_entries()
array
Hash array with normalized entries, indexed by their DNs
normalize_entry(array $entry) : array
array
Attributes array as retrieved from ldap_get_attributes() or ldap_get_entries()
array
Hash array with attributes as keys
_vlv_set_controls($sort, $list_page, $page_size, $search = null)
_attr_name($namev)
quote_string(string $str, bool $dn = false) : string
string
Attribute value
bool
True if the attribute is a DN
string
Quoted string
_debug($str)
_vlv_search($sort, $search)
_find_vlv($base_dn, $filter, $scope, $sort_attrs = null) : string
string
Sort attribute or False if no match
_read_vlv_config()
_vlv_ber_encode($offset, $rpp, $search = '') : string
string
BER encoded option value
_sort_ber_encode($sortcols) : string
string
BER encoded option value
_ber_addseq($str, $identifier)
_ber_encode_int($offset)
_string2hex($str)
UPDATE_MOD_ADD
UPDATE_MOD_DELETE
UPDATE_MOD_REPLACE
UPDATE_MOD_FULL
conn :
vlv_active :
cache :
config :
attributes :
entries :
result :
debug :
list_page :
page_size :
vlv_config :