From 2876a2838ce6d9c6f9d86d3d59c451c5912210bc Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 20 Sep 2017 09:27:39 -0600 Subject: [PATCH] Adjust 'Group' account search keyword so even if someone searches for 'Group', we still respect the 'type' parameter and only return user accounts if that was what was requested. --- api/src/Accounts.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/src/Accounts.php b/api/src/Accounts.php index 6710c5d0e4..ec3ac52aa0 100644 --- a/api/src/Accounts.php +++ b/api/src/Accounts.php @@ -199,7 +199,9 @@ class Accounts // Check for lang(Group) in search - if there, we search all groups $group_index = array_search(strtolower(lang('Group')), array_map('strtolower', $query = explode(' ',$param['query']))); - if($group_index !== FALSE) + if($group_index !== FALSE && !( + in_array($param['type'], array('accounts', 'groupmembers')) || is_int($param['type']) + )) { // do not return any groups for account-selection == "none" if ($GLOBALS['egw_info']['user']['preferences']['common']['account_selection'] === 'none' &&