public function unregisterManagersFromTeam(Team $team, array $users)
    {
        $teamManagerRole = $team->getTeamManagerRole();

        if (!is_null($teamManagerRole)) {
            $this->om->startFlushSuite();

            $teamManager = $team->getTeamManager();

            foreach ($users as $user) {
                $this->roleManager->dissociateRole($user, $teamManagerRole);

                if ($teamManager && $teamManager->getid() === $user->getId()) {
                    $team->setTeamManager(null);
                }
            }
            $this->om->persist($team);
            $this->om->endFlushSuite();
        }
    }