@@ -224,46 +224,19 @@ public function getUnassignedID($uid, $UnitySQL)
224
224
public function getAllUsers ($ UnitySQL , $ UnityMailer , $ UnityRedis , $ UnityWebhook , $ ignorecache = false )
225
225
{
226
226
$ out = array ();
227
-
228
- if (!$ ignorecache ) {
229
- $ users = $ UnityRedis ->getCache ("sorted_users " , "" );
230
- if (!is_null ($ users )) {
231
- foreach ($ users as $ user ) {
232
- array_push ($ out , new UnityUser ($ user , $ this , $ UnitySQL , $ UnityMailer , $ UnityRedis , $ UnityWebhook ));
233
- }
234
-
235
- return $ out ;
236
- }
237
- }
238
-
239
227
$ users = $ this ->userGroup ->getAttribute ("memberuid " );
240
228
sort ($ users );
241
229
foreach ($ users as $ user ) {
242
230
$ params = array ($ user , $ this , $ UnitySQL , $ UnityMailer , $ UnityRedis , $ UnityWebhook );
243
231
array_push ($ out , new UnityUser (...$ params ));
244
232
}
245
-
246
233
return $ out ;
247
234
}
248
235
249
236
public function getAllPIGroups ($ UnitySQL , $ UnityMailer , $ UnityRedis , $ UnityWebhook , $ ignorecache = false )
250
237
{
251
238
$ out = array ();
252
-
253
- if (!$ ignorecache ) {
254
- $ groups = $ UnityRedis ->getCache ("sorted_groups " , "" );
255
- if (!is_null ($ groups )) {
256
- foreach ($ groups as $ group ) {
257
- $ params = array ($ group , $ this , $ UnitySQL , $ UnityMailer , $ UnityRedis , $ UnityWebhook );
258
- array_push ($ out , new UnityGroup (...$ params ));
259
- }
260
-
261
- return $ out ;
262
- }
263
- }
264
-
265
239
$ pi_groups = $ this ->pi_groupOU ->getChildren (true );
266
-
267
240
foreach ($ pi_groups as $ pi_group ) {
268
241
array_push ($ out , new UnityGroup (
269
242
$ pi_group ->getAttribute ("cn " )[0 ],
@@ -274,27 +247,13 @@ public function getAllPIGroups($UnitySQL, $UnityMailer, $UnityRedis, $UnityWebho
274
247
$ UnityWebhook
275
248
));
276
249
}
277
-
278
250
return $ out ;
279
251
}
280
252
281
253
public function getAllOrgGroups ($ UnitySQL , $ UnityMailer , $ UnityRedis , $ UnityWebhook , $ ignorecache = false )
282
254
{
283
255
$ out = array ();
284
-
285
- if (!$ ignorecache ) {
286
- $ orgs = $ UnityRedis ->getCache ("sorted_orgs " , "" );
287
- if (!is_null ($ orgs )) {
288
- foreach ($ orgs as $ org ) {
289
- array_push ($ out , new UnityOrg ($ org , $ this , $ UnitySQL , $ UnityMailer , $ UnityRedis , $ UnityWebhook ));
290
- }
291
-
292
- return $ out ;
293
- }
294
- }
295
-
296
256
$ org_groups = $ this ->org_groupOU ->getChildren (true );
297
-
298
257
foreach ($ org_groups as $ org_group ) {
299
258
array_push ($ out , new UnityOrg (
300
259
$ org_group ->getAttribute ("cn " )[0 ],
@@ -305,7 +264,6 @@ public function getAllOrgGroups($UnitySQL, $UnityMailer, $UnityRedis, $UnityWebh
305
264
$ UnityWebhook
306
265
));
307
266
}
308
-
309
267
return $ out ;
310
268
}
311
269
0 commit comments