From 41cf864a73a13d3e035bfc57c0c2054edc14b1f5 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 29 May 2012 22:24:15 +0000 Subject: [PATCH] Respect group filter, if passed --- phpgwapi/inc/class.accounts.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.accounts.inc.php b/phpgwapi/inc/class.accounts.inc.php index d1ce273b82..935e50a74d 100644 --- a/phpgwapi/inc/class.accounts.inc.php +++ b/phpgwapi/inc/class.accounts.inc.php @@ -362,9 +362,10 @@ class accounts break; } $accounts = array(); + $type = $GLOBALS['egw_info']['user']['preferences']['common']['account_selection'] == 'groupmembers' && + !isset($GLOBALS['egw_info']['user']['apps']['admin']) ? 'groupmembers+memberships' : 'both'; foreach(self::getInstance()->search(array( - 'type' => $GLOBALS['egw_info']['user']['preferences']['common']['account_selection'] == 'groupmembers' && - !isset($GLOBALS['egw_info']['user']['apps']['admin']) ? 'groupmembers+memberships' : 'both', + 'type' => $options['filter']['group'] ? $options['filter']['group'] : $type, 'query' => $pattern, 'query_type' => 'all', 'order' => $order,