Skip to content

Commit 0308fd1

Browse files
committed
getChildren specify attributes
search update submodule
1 parent 969c0ad commit 0308fd1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

resources/lib/UnityLDAP.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,19 +167,19 @@ private function IDNumInUse($id)
167167
if (($id >= 100 && $id <= 999) || ($id >= 60000 && $id <= 64999)) {
168168
return true;
169169
}
170-
$users = $this->userOU->getChildrenArray(true);
170+
$users = $this->userOU->getChildrenArray([], true);
171171
foreach ($users as $user) {
172172
if ($user["uidnumber"][0] == $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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
// search entire tree, some users created for admin purposes might not be in the normal OU
3737
echo "waiting for LDAP search (users)...\n";
38-
$users = $LDAP->search("objectClass=posixAccount", $CONFIG["ldap"]["basedn"]);
38+
$users = $LDAP->search("objectClass=posixAccount", $CONFIG["ldap"]["basedn"], []);
3939
echo "response received.\n";
4040
$user_CNs = $LDAP->getUserGroup()->getAttribute("memberuid");
4141
sort($user_CNs);
@@ -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)