Skip to content

Commit bb1a2c6

Browse files
committed
refactor
1 parent fc29127 commit bb1a2c6

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

resources/lib/UnityLDAP.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,19 @@ public function getPIGroupGIDsWithMemberUID(string $uid): array
256256
);
257257
}
258258

259+
public function getPIGroupAttributesWithMemberUID(
260+
string $uid,
261+
array $attributes,
262+
array $default_values = [],
263+
) {
264+
return $this->pi_groupOU->getChildrenArrayStrict(
265+
$attributes,
266+
recursive: false,
267+
filter: sprintf("(memberuid=%s)", ldap_escape($uid, "", LDAP_ESCAPE_FILTER)),
268+
default_values: $default_values,
269+
);
270+
}
271+
259272
/**
260273
* Returns an associative array where keys are UIDs and values are arrays of PI GIDs
261274
*/
@@ -397,17 +410,4 @@ public function getUsersAttributes(
397410
ksort($output);
398411
return $output;
399412
}
400-
401-
public function getPIGroupsAttributesWithMemberUID(
402-
string $uid,
403-
array $attributes,
404-
array $default_values = [],
405-
) {
406-
return $this->pi_groupOU->getChildrenArrayStrict(
407-
$attributes,
408-
recursive: false,
409-
filter: sprintf("(memberuid=%s)", ldap_escape($uid, "", LDAP_ESCAPE_FILTER)),
410-
default_values: $default_values,
411-
);
412-
}
413413
}

webroot/panel/groups.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
<?php
7777
$PIGroupGIDs = [];
78-
$PIGroupAttributes = $LDAP->getPIGroupsAttributesWithMemberUID(
78+
$PIGroupAttributes = $LDAP->getPIGroupAttributesWithMemberUID(
7979
$USER->uid,
8080
["cn", "memberuid"],
8181
default_values: ["memberuid" => []]

0 commit comments

Comments
 (0)