| @@ 114-123 (lines=10) @@ | ||
| 111 | $groups = $auth->getGroupsByFilter(false); |
|
| 112 | $count = count($groups); |
|
| 113 | $res = array(); |
|
| 114 | for($i = 0; $i < $count; $i++) |
|
| 115 | { |
|
| 116 | $tmp = json_decode(json_encode($groups[$i]), true); |
|
| 117 | $tmp['type'] = 'Group'; |
|
| 118 | if($keys !== false) |
|
| 119 | { |
|
| 120 | $tmp = array_intersect_key($tmp, $keys); |
|
| 121 | } |
|
| 122 | $res[] = $tmp; |
|
| 123 | } |
|
| 124 | $users = $auth->getUsersByFilter(false); |
|
| 125 | $count = count($users); |
|
| 126 | for($i = 0; $i < $count; $i++) |
|
| @@ 126-135 (lines=10) @@ | ||
| 123 | } |
|
| 124 | $users = $auth->getUsersByFilter(false); |
|
| 125 | $count = count($users); |
|
| 126 | for($i = 0; $i < $count; $i++) |
|
| 127 | { |
|
| 128 | $tmp = json_decode(json_encode($users[$i]), true); |
|
| 129 | $tmp['type'] = 'User'; |
|
| 130 | if($keys !== false) |
|
| 131 | { |
|
| 132 | $tmp = array_intersect_key($tmp, $keys); |
|
| 133 | } |
|
| 134 | $res[] = $tmp; |
|
| 135 | } |
|
| 136 | return $res; |
|
| 137 | } |
|
| 138 | ||
| @@ 156-161 (lines=6) @@ | ||
| 153 | if($keys !== false) |
|
| 154 | { |
|
| 155 | $count = count($nonMembers); |
|
| 156 | for($i = 0; $i < $count; $i++) |
|
| 157 | { |
|
| 158 | $tmp = json_decode(json_encode($nonMembers[$i]), true); |
|
| 159 | $tmp['type'] = $this->getTypeOfEntity($nonMembers[$i]); |
|
| 160 | $nonMembers[$i] = array_intersect_key($tmp, $keys); |
|
| 161 | } |
|
| 162 | } |
|
| 163 | return $nonMembers; |
|
| 164 | } |
|