Skip to content
Snippets Groups Projects
Unverified Commit a87a0ba4 authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo Committed by GitHub
Browse files

Merge pull request #761 from vittala/ldap_group_avoid_assert_warning

Prevent an assert by only calling a sub-search if needed
parents a5437da2 6591907a
No related branches found
No related tags found
No related merge requests found
...@@ -263,7 +263,9 @@ class sspmod_ldap_Auth_Process_AttributeAddUsersGroups extends sspmod_ldap_Auth_ ...@@ -263,7 +263,9 @@ class sspmod_ldap_Auth_Process_AttributeAddUsersGroups extends sspmod_ldap_Auth_
$groups[] = $dn; $groups[] = $dn;
// Recursively search "sub" groups // Recursively search "sub" groups
$groups = array_merge($groups, $this->search($attributes[$map['memberof']])); if (!empty($attributes[$map['memberof']])) {
$groups = array_merge($groups, $this->search($attributes[$map['memberof']]));
}
} }
// Return only the unique group names // Return only the unique group names
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment