| @@ 516-524 (lines=9) @@ | ||
| 513 | } |
|
| 514 | ||
| 515 | // the user is a direct member of group with a mapping, add them to the SS group. |
|
| 516 | if ($mapping->DN == $groupDN) { |
|
| 517 | $group = $mapping->Group(); |
|
| 518 | if ($group && $group->exists()) { |
|
| 519 | $group->Members()->add($member, array( |
|
| 520 | 'IsImportedFromLDAP' => '1' |
|
| 521 | )); |
|
| 522 | $mappedGroupIDs[] = $mapping->GroupID; |
|
| 523 | } |
|
| 524 | } |
|
| 525 | ||
| 526 | // the user *might* be a member of a nested group provided the scope of the mapping |
|
| 527 | // is to include the entire subtree. Check all those mappings and find the LDAP child groups |
|
| @@ 536-544 (lines=9) @@ | ||
| 533 | } |
|
| 534 | ||
| 535 | foreach ($childGroups as $childGroupDN => $childGroupRecord) { |
|
| 536 | if ($childGroupDN == $groupDN) { |
|
| 537 | $group = $mapping->Group(); |
|
| 538 | if ($group && $group->exists()) { |
|
| 539 | $group->Members()->add($member, array( |
|
| 540 | 'IsImportedFromLDAP' => '1' |
|
| 541 | )); |
|
| 542 | $mappedGroupIDs[] = $mapping->GroupID; |
|
| 543 | } |
|
| 544 | } |
|
| 545 | } |
|
| 546 | } |
|
| 547 | } |
|