|
|
|
@ -48,11 +48,17 @@ class AzureSyncUsergroupsCommand extends AzureCommand |
|
|
|
|
|
|
|
|
|
|
|
yield sprintf('Obtaining members for group (ID %d)', $groupId); |
|
|
|
yield sprintf('Obtaining members for group (ID %d)', $groupId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
foreach ($this->getAzureGroupMembers($azureGroupUid) as $azureGroupMember) { |
|
|
|
foreach ($this->getAzureGroupMembers($azureGroupUid) as $azureGroupMember) { |
|
|
|
if ($userId = $this->plugin->getUserIdByVerificationOrder($azureGroupMember, 'id')) { |
|
|
|
if ($userId = $this->plugin->getUserIdByVerificationOrder($azureGroupMember, 'id')) { |
|
|
|
$newGroupMembers[] = $userId; |
|
|
|
$newGroupMembers[] = $userId; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} catch (Exception $e) { |
|
|
|
|
|
|
|
yield $e->getMessage(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($newGroupMembers) { |
|
|
|
if ($newGroupMembers) { |
|
|
|
$usergroup->subscribe_users_to_usergroup($groupId, $newGroupMembers); |
|
|
|
$usergroup->subscribe_users_to_usergroup($groupId, $newGroupMembers); |
|
|
|
|