| @@ 175-184 (lines=10) @@ | ||
| 172 | $res = array(); |
|
| 173 | $groups = $auth->getGroupsByFilter(false); |
|
| 174 | $count = count($groups); |
|
| 175 | for($i = 0; $i < $count; $i++) |
|
| 176 | { |
|
| 177 | $tmp = json_decode(json_encode($groups[$i]), true); |
|
| 178 | $tmp['type'] = 'Group'; |
|
| 179 | if($keys !== false) |
|
| 180 | { |
|
| 181 | $tmp = array_intersect_key($tmp, $keys); |
|
| 182 | } |
|
| 183 | $res[] = $tmp; |
|
| 184 | } |
|
| 185 | $users = $auth->getUsersByFilter(false); |
|
| 186 | $count = count($users); |
|
| 187 | for($i = 0; $i < $count; $i++) |
|
| @@ 187-196 (lines=10) @@ | ||
| 184 | } |
|
| 185 | $users = $auth->getUsersByFilter(false); |
|
| 186 | $count = count($users); |
|
| 187 | for($i = 0; $i < $count; $i++) |
|
| 188 | { |
|
| 189 | $tmp = json_decode(json_encode($users[$i]), true); |
|
| 190 | $tmp['type'] = 'User'; |
|
| 191 | if($keys !== false) |
|
| 192 | { |
|
| 193 | $tmp = array_intersect_key($tmp, $keys); |
|
| 194 | } |
|
| 195 | $res[] = $tmp; |
|
| 196 | } |
|
| 197 | return $res; |
|
| 198 | } |
|
| 199 | ||
| @@ 205-210 (lines=6) @@ | ||
| 202 | if($keys !== false) |
|
| 203 | { |
|
| 204 | $count = count($nonMembers); |
|
| 205 | for($i = 0; $i < $count; $i++) |
|
| 206 | { |
|
| 207 | $tmp = json_decode(json_encode($nonMembers[$i]), true); |
|
| 208 | $tmp['type'] = getTypeOfEntity($nonMembers[$i]); |
|
| 209 | $nonMembers[$i] = array_intersect_key($tmp, $keys); |
|
| 210 | } |
|
| 211 | } |
|
| 212 | return $nonMembers; |
|
| 213 | } |
|