@@ -256,33 +256,12 @@ public function getPIGroupGIDsWithMemberUID(string $uid): array
256256 );
257257 }
258258
259- public function getAllPIGroupOwnerAttributes (
260- array $ attributes ,
261- array $ default_values = [],
262- ): array {
263- // get the PI groups, filter for just the GIDs, then map the GIDs to owner UIDs
264- $ owner_uids = array_map (
265- fn ($ x ) => UnityGroup::GID2OwnerUID ($ x ),
266- array_map (fn ($ x ) => $ x ["cn " ][0 ], $ this ->pi_groupOU ->getChildrenArrayStrict (["cn " ])),
267- );
268- $ owner_attributes = $ this ->getQualifiedUsersAttributes ($ attributes , $ default_values );
269- foreach ($ owner_attributes as $ i => $ attributes ) {
270- if (!in_array ($ attributes ["uid " ][0 ], $ owner_uids )) {
271- unset($ owner_attributes [$ i ]);
272- }
273- }
274- $ owner_attributes = array_values ($ owner_attributes ); // reindex
275- $ owners_not_found = array_diff (
276- $ owner_uids ,
277- array_map (fn ($ x ) => $ x ["uid " ][0 ], $ owner_attributes ),
259+ public function getAllPIGroupOwnerUIDs (): array
260+ {
261+ return array_map (
262+ fn ($ x ) => UnityGroup::GID2OwnerUID ($ x ["cn " ][0 ]),
263+ $ this ->pi_groupOU ->getChildrenArrayStrict (["cn " ]),
278264 );
279- if (count ($ owners_not_found ) > 0 ) {
280- UnityHTTPD::errorLog (
281- "warning " ,
282- "PI group owners not found: " . \jsonEncode ($ owners_not_found ) . "\n" ,
283- );
284- }
285- return $ owner_attributes ;
286265 }
287266
288267 /**
0 commit comments