Skip to content

Commit 465bd97

Browse files
committed
getChildren specify attributes
1 parent 4ca2943 commit 465bd97

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

resources/lib/UnityLDAP.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@ private function IDNumInUse($id)
173173
return true;
174174
}
175175
}
176-
$pi_groups = $this->pi_groupOU->getChildrenArray(true);
176+
$pi_groups = $this->pi_groupOU->getChildrenArray(["gidnumber"], true);
177177
foreach ($pi_groups as $pi_group) {
178178
if ($pi_group["gidnumber"][0] == $id) {
179179
return true;
180180
}
181181
}
182-
$groups = $this->groupOU->getChildrenArray(true);
182+
$groups = $this->groupOU->getChildrenArray(["gidnumber"], true);
183183
foreach ($groups as $group) {
184184
if ($group["gidnumber"][0] == $id) {
185185
return true;

workers/update-ldap-cache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
$org_group_ou = new LDAPEntry($LDAP->getConn(), $CONFIG["ldap"]["orggroup_ou"]);
5858
echo "waiting for LDAP search (org groups)...\n";
59-
$org_groups = $org_group_ou->getChildrenArray(true);
59+
$org_groups = $org_group_ou->getChildrenArray(["cn", "memberuid"], true);
6060
echo "response received.\n";
6161
// phpcs:disable
6262
$org_group_CNs = array_map(function($x){return $x["cn"][0];}, $org_groups);
@@ -70,7 +70,7 @@
7070

7171
$pi_group_ou = new LDAPEntry($LDAP->getConn(), $CONFIG["ldap"]["pigroup_ou"]);
7272
echo "waiting for LDAP search (pi groups)...\n";
73-
$pi_groups = $pi_group_ou->getChildrenArray(true);
73+
$pi_groups = $pi_group_ou->getChildrenArray(["cn", "memberuid"], true);
7474
echo "response received.\n";
7575
// phpcs:disable
7676
$pi_group_CNs = array_map(function($x){return $x["cn"][0];}, $pi_groups);

0 commit comments

Comments
 (0)