forked from extern/egroupware
fix/improve the filter handling for querying all accounts, due to problems with unlimited querys, and/or large groups
This commit is contained in:
parent
7b01f31d7d
commit
e4c29d36fc
@ -712,6 +712,14 @@ class accounts_ldap
|
|||||||
$sortFn = $param['sort'] == 'DESC' ? 'arsort' : 'asort';
|
$sortFn = $param['sort'] == 'DESC' ? 'arsort' : 'asort';
|
||||||
$sortFn($fullSet);
|
$sortFn($fullSet);
|
||||||
$relevantAccounts = is_numeric($start) ? array_slice(array_keys($fullSet), $start, $offset) : array_keys($fullSet);
|
$relevantAccounts = is_numeric($start) ? array_slice(array_keys($fullSet), $start, $offset) : array_keys($fullSet);
|
||||||
|
// if we do not have a start, or want the members of a certain group, we want all, that way we dont want to or the uids
|
||||||
|
// since if we have a whole lot of members, it slows the query down
|
||||||
|
// if you work with very big groups, it may present a problem
|
||||||
|
if (is_numeric($start) || is_numeric($param['type'])) {
|
||||||
|
$filter = "(" . "&(objectclass=posixaccount)" . '(|(uid='.implode(')(uid=',$relevantAccounts).'))' . $this->account_filter . ")";
|
||||||
|
} else {
|
||||||
|
$filter = "(" . "&(objectclass=posixaccount)" . $this->account_filter . ")";
|
||||||
|
}
|
||||||
|
|
||||||
$filter = "(" . "&(objectclass=posixaccount)" . '(|(uid='.implode(')(uid=',$relevantAccounts).'))' . $this->account_filter . ")";
|
$filter = "(" . "&(objectclass=posixaccount)" . '(|(uid='.implode(')(uid=',$relevantAccounts).'))' . $this->account_filter . ")";
|
||||||
$filter = str_replace(array('%user','%domain'),array('*',$GLOBALS['egw_info']['user']['domain']),$filter);
|
$filter = str_replace(array('%user','%domain'),array('*',$GLOBALS['egw_info']['user']['domain']),$filter);
|
||||||
|
Loading…
Reference in New Issue
Block a user