Create a group for array of logins.

@param string[] $logins

@return Group
554507
public function createForPlayers($logins)
    {
        $class = $this->class;
        /** @var Group $group */
        $group = new $class(null, $this->dispatcher);

        $this->groups[$group->getName()] = $group;
        foreach ($logins as $login) {
            $group->addLogin($login);
        }

        return $group;
    }
666010
public function setAuth($login, $password)
    {
        $this->login    = $login;
        $this->password = $password;

        $this->apiClient
            ->setBearerToken(null)
            ->setShopId($this->login)
            ->setShopPassword($this->password);

        return $this;
    }
532190
public function create(array $attributes)
    {
        $group = $this->sentry->getGroupProvider()->create($attributes);
        $this->event->fire('groups.create', array($group));
        return $group;
    }
794134
protected function createToken($login) {
    $jwt = (new Builder())
            ->setIssuer($this->getTokenIssuer())
            ->setIssuedAt(time())
            ->setExpiration(time()+3600)
            ->set(self::AUTH_USER_NAME, $login)
            ->sign($this->getTokenSigner(), $this->key)
            ->getToken();
    return $jwt->__toString();
  }
294393
public function createGroup(string $name, array $properties = []): Group
	{
		$properties =
		[
			'name' => $name,
		] + $properties;

		return $this->groupRepository->createGroup($properties);
	}
314152
public function createUserAndMembership($roles = [Membership::ROLE_READ], $organization = '')
    {
        if (\is_string($roles)) {
            $roles = [$roles];
        }
        $roles = array_map(function ($role) {
            return strtolower($role);
        }, $roles);
        $contents = $this
            ->call('POST',
                implode('/', [self::ORGANIZATION_RESOURCE, $this->getOrganizationName($organization), 'memberships']),
                ['json' => [
                    'roles' => $roles,
            ]])
            ->getBody()
            ->getContents();

        return $this->getSingleMemberShipFromJsonResponse($contents);
    }
1282009
final public function create(array $properties = array())
    {
        $context = $this->getContext();
        $context->entity = $properties;

        if ($this->invokeCommand('before.create', $context) !== false)
        {
            $context->entity = $this->_actionCreate($context);
            $this->invokeCommand('after.create', $context);
        }

        $this->_entity = KObjectConfig::unbox($context->entity);

        return $this->_entity;
    }
1173085
public function findByLogin($login)
    {
        $playerQuery = PlayerQuery::create();
        $player = $playerQuery->findOneByLogin($login);

        PlayerTableMap::clearInstancePool();
        return $player;
    }
547401
public function addLogin($login)
    {
        if (!isset($this->logins[$login])) {
            $this->logins[$login] = true;
            $this->dispatcher->dispatch(self::EVENT_NEW_USER, [$this, $login]);
        }
    }
1313583
public function createFromArray(array $types)
    {
        foreach ($types as $type) {
            $this->collection->add(Type::fromString($type));
        }

        return $this->collection;
    }
845450
function group($expr)
    {
        if (null === $expr) {
            $this->nodes->groups = array();
        } else {
            $this->nodes->groups[] = new Group($expr);
        }
        return $this;
    }
282757
public function group(...$groups)
    {
        foreach($groups as $item)
        {
            $group = new Group();
            $group->setValue($item);
            $this->option->group[] = $group;
        }
        return $this;
    }
37444
public function filterLogins($logins)
    {
        if ($this->access->hasSuperUserAccess()) {
            return $logins;
        }

        if (!$this->access->isUserHasSomeAdminAccess()) {
            // keep only own user if it is in the list
            foreach ($logins as $login) {
                if ($this->isOwnLogin($login)) {
                    return array($login);
                }
            }

            return array();
        }

        foreach ($logins as $index => $login) {
            if (!$this->isNonSuperUserAllowedToSeeThisLogin($login)) {
                unset($logins[$index]);
            }
        }

        return array_values($logins);
    }
230610
public function createGroup(string $groupName, int $maxClients = -1)
    {
        if(!isset($this->groups[$groupName]))
        {
            $this->groups[$groupName] = RequestContext::getServerBean('ServerGroup', $this, $groupName, $maxClients);
        }
        return $this->groups[$groupName];
    }
336464
public function setMemberList(array $members)
    {
        $memberLists = [];
        foreach ($members as $key => $value) {
            $memberLists[] = ['Member_Account' => $key, 'Role' => $value];
        }
        $this->setParameter('MemberList', $memberLists);
        return $this;
    }
529383
public function toMembers($members) {
		if($members instanceof Member) {
			$this->members = new ArrayList(array($members));
		}
		elseif(is_array($members) || $members instanceof SS_List) {
			$this->members = $members;
		}

		return $this;
	}
578031
public function create(array $attributes)
	{
		if ( ! isset($credentials['permissions']) )
		{
			$credentials['permissions'] = array();
		}

		$group = $this->createModel();
		$group->values($attributes, array('name', 'permissions'));
		$group->save();

		return $group;
	}