Skip to content

Commit 737f0ad

Browse files
committed
add warning when a PI group owner cannot be found
1 parent 5c36b54 commit 737f0ad

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

resources/lib/UnityLDAP.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,17 @@ public function getAllPIGroupOwnerAttributes($attributes)
322322
unset($owner_attributes[$i]);
323323
}
324324
}
325+
$owner_attributes = array_values($owner_attributes); // reindex
326+
$owners_not_found = array_diff(
327+
$owner_uids,
328+
array_map(fn($x) => $x["uid"][0], $owner_attributes)
329+
);
330+
if (count($owners_not_found) > 0) {
331+
UnitySite::errorLog(
332+
"warning",
333+
"PI group owners not found: " . json_encode($owners_not_found) . "\n"
334+
);
335+
}
325336
return $owner_attributes;
326337
}
327338

0 commit comments

Comments
 (0)