示例#1
0
 /**
  *
  */
 public function syncGrouphubGroupsFromQueue()
 {
     $this->logger->info('Processing Grouphub groups from queue...');
     $groupIds = $this->queue->getQueuedGroups();
     $grouphubGroups = $this->api->findGrouphubGroupsByIds($groupIds);
     $ldapGroups = $this->ldap->findGrouphubGroupsByIds($groupIds);
     if (count($grouphubGroups) === 0 && count($ldapGroups) === 0) {
         $this->logger->info('Done syncing Grouphub groups!');
         return;
     }
     $this->doGrouphubGroupsSync($grouphubGroups, $ldapGroups);
     $this->queue->clearGroupQueue();
 }
示例#2
0
 /**
  * @param int $groupId
  * @param int $userId
  */
 public function addMembership($groupId, $userId)
 {
     $this->client->addGroupUser($groupId, $userId);
     $this->queue->addGroupToQueue($groupId);
 }
示例#3
0
 /**
  * @param Group $group
  */
 public function updateGroup(Group $group)
 {
     $this->client->updateGroup($group->getId(), $group);
     $this->queue->addGroupToQueue($group->getId());
 }