Model class to access an LDAP address directory
package |
Framework |
---|---|
subpackage |
Addressbook |
__construct(array $p, boolean $debug = false, string $mail_domain = null)
array
LDAP connection properties
boolean
Enables debug mode
string
Current user mail domain name
_connect()
close()
get_name()
set_page($page)
access |
public |
---|---|
set_pagesize($size)
access |
public |
---|---|
set_sort_order(string $sort_col, string $sort_order = null)
string
Sort column
string
Sort order
set_search_set($filter)
get_search_set() : mixed
mixed
Search properties used by this class
reset()
list_records($cols = null, $subset) : array
array
Indexed list of contact records, each a hash array
list_group_members($dn, $count = false, $entries = null) : array
array
Accumulated group members
_list_group_members($dn, $entry, $attr, $count) : array
array
Accumulated group members
_list_group_memberurl($dn, $entry, $count) : array
array
Accumulated group members
_entry_sort_cmp($a, $b)
search($fields, $value, $mode, $select = true, $nocount = false, $required = array()) : object
object
rcube_result_set List of contact records and 'count' value
count() : \rcube_result_set
get_result() : \rcube_result_set
get_record($id, $assoc = false) : mixed
mixed
Result object with all record fields or False if not found
validate(&$save_data, $autofix = false) : boolean
If input isn't valid, the message to display can be fetched using get_error()
boolean
True if input is valid, False if not.
insert($save_data, $check = false) : mixed
mixed
The created record ID on success, False on error
update($id, $save_cols) : mixed
mixed
On success if ID has been changed returns ID, otherwise True, False on error
delete($ids, $force = true)
delete_all(bool $with_groups = false)
bool
Remove also groups
add_autovalues(&$attrs)
_ldap2result($rec)
_map_field($field)
_map_data($save_cols)
_attr_name($namev)
is_group_entry($entry)
_debug($str)
set_debug(boolean $dbg = true)
boolean
True if LDAP commands should be logged
set_group($gid)
list_groups($search = null, $mode) : array
array
Indexed list of contact groups, each a hash array
_fetch_groups($vlv_page = null)
get_group_entry($group_id)
get_group($group_id) : array
array
Group properties as hash array
create_group($name) : mixed
mixed
False on error, array with record props in success
delete_group($gid) : boolean
boolean
True on success, false if no data was changed
rename_group($gid, $newname, &$newid) : boolean
boolean
New name on success, false if no data was changed
add_to_group($group_id, $ids) : int
int
Number of contacts added
remove_from_group($group_id, $ids) : int
int
Number of deleted group members
get_record_groups($id) : array
since | 0.5-beta |
---|---|
array
List of assigned groups as ID=>Name pairs
get_group_member_attr($object_classes = array(), $default = 'member')
dn_encode(string $str) : string
string
DN string
string
Encoded HTML identifier string
dn_decode(string $str) : string
string
Encoded HTML identifier string
string
DN string
refresh_search() : mixed
mixed
New search set
get_error() : array
array
Hash array with the following fields: type, message
set_error($type, $message)
insertMultiple($recset, $check = false) : array
array
List of created record IDs
undelete($ids)
get_col_values($col, $data, $flat = false) : array
array
List of column values
normalize_string($str) : string
Currently only optimized for Latin-1 characters; to be extended
deprecated |
since 0.9-beta |
---|---|
string
Normalized string
compose_display_name($contact, $full_email = false) : string
string
Display name
compose_list_name($contact) : string
This respects the settings parameter how to list conacts.
string
List name
compose_contact_key($contact, $sort_col)
compare_search_value(string $colname, string|array $value, string $search, int $mode) : bool
string
Data name
string|array
Data value
string
Search value
int
Search mode
bool
Comparision result
ERROR_READ_ONLY
ERROR_NO_CONNECTION
ERROR_VALIDATE
ERROR_SAVING
ERROR_SEARCH
primary_key :
groups :
readonly :
ready :
group_id :
coltypes :
export_groups :
ldap :
prop :
fieldmap :
filter :
sub_filter :
result :
ldap_result :
mail_domain :
debug :
group_types : array
var | |
---|---|
array
base_dn :
groups_base_dn :
group_url :
cache :
searchonly :
undelete :
list_page :
page_size :
sort_col :
sort_order :
date_cols :
error :