| @@ 186-195 (lines=10) @@ | ||
| 183 | $res = array(); |
|
| 184 | $groups = $auth->getGroupsByFilter(false); |
|
| 185 | $count = count($groups); |
|
| 186 | for($i = 0; $i < $count; $i++) |
|
| 187 | { |
|
| 188 | $tmp = json_decode(json_encode($groups[$i]), true); |
|
| 189 | $tmp['type'] = 'Group'; |
|
| 190 | if($keys !== false) |
|
| 191 | { |
|
| 192 | $tmp = array_intersect_key($tmp, $keys); |
|
| 193 | } |
|
| 194 | $res[] = $tmp; |
|
| 195 | } |
|
| 196 | $users = $auth->getUsersByFilter(false); |
|
| 197 | $count = count($users); |
|
| 198 | for($i = 0; $i < $count; $i++) |
|
| @@ 198-207 (lines=10) @@ | ||
| 195 | } |
|
| 196 | $users = $auth->getUsersByFilter(false); |
|
| 197 | $count = count($users); |
|
| 198 | for($i = 0; $i < $count; $i++) |
|
| 199 | { |
|
| 200 | $tmp = json_decode(json_encode($users[$i]), true); |
|
| 201 | $tmp['type'] = 'User'; |
|
| 202 | if($keys !== false) |
|
| 203 | { |
|
| 204 | $tmp = array_intersect_key($tmp, $keys); |
|
| 205 | } |
|
| 206 | $res[] = $tmp; |
|
| 207 | } |
|
| 208 | return $res; |
|
| 209 | } |
|
| 210 | ||
| @@ 216-221 (lines=6) @@ | ||
| 213 | if($keys !== false) |
|
| 214 | { |
|
| 215 | $count = count($nonMembers); |
|
| 216 | for($i = 0; $i < $count; $i++) |
|
| 217 | { |
|
| 218 | $tmp = json_decode(json_encode($nonMembers[$i]), true); |
|
| 219 | $tmp['type'] = getTypeOfEntity($nonMembers[$i]); |
|
| 220 | $nonMembers[$i] = array_intersect_key($tmp, $keys); |
|
| 221 | } |
|
| 222 | } |
|
| 223 | return $nonMembers; |
|
| 224 | } |
|