Update files to PSR-2 standards
This commit is contained in:
parent
d640cc1eee
commit
37aa8b05f8
|
@ -206,10 +206,13 @@ class LdapService
|
|||
* @param array $checked
|
||||
* @return array
|
||||
*/
|
||||
private function getGroupsRecursive($groupsArray,$checked) {
|
||||
private function getGroupsRecursive($groupsArray, $checked)
|
||||
{
|
||||
$groups_to_add = [];
|
||||
foreach ($groupsArray as $groupName) {
|
||||
if (in_array($groupName,$checked)) continue;
|
||||
if (in_array($groupName, $checked)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$groupsToAdd = $this->getGroupGroups($groupName);
|
||||
$groups_to_add = array_merge($groups_to_add, $groupsToAdd);
|
||||
|
@ -260,7 +263,9 @@ class LdapService
|
|||
$groupsAttr = strtolower($this->config['group_attribute']);
|
||||
$ldapGroups = [];
|
||||
$count = 0;
|
||||
if (isset($ldapSearchReturn[$groupsAttr]['count'])) $count = (int) $ldapSearchReturn[$groupsAttr]['count'];
|
||||
if (isset($ldapSearchReturn[$groupsAttr]['count'])) {
|
||||
$count = (int) $ldapSearchReturn[$groupsAttr]['count'];
|
||||
}
|
||||
for ($i=0; $i<$count; $i++) {
|
||||
$dnComponents = ldap_explode_dn($ldapSearchReturn[$groupsAttr][$i], 1);
|
||||
if (!in_array($dnComponents[0], $ldapGroups)) {
|
||||
|
@ -269,5 +274,4 @@ class LdapService
|
|||
}
|
||||
return $ldapGroups;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue