@return string[]

@example
'user_{alice, bob}' => [
'user_alice',
'user_bob',
]
351593
public function buildIds(string $id): array
    {
        $matches = [];
        if (false === $this->canDenormalize($id, $matches)) {
            throw LogicExceptionFactory::createForCannotDenormalizerForChainableFixtureBuilderDenormalizer(__METHOD__);
        }

        $listElements = preg_split('/\s*,\s*/', $matches['list']);

        $ids = [];
        foreach ($listElements as $element) {
            $ids[
                str_replace(
                    sprintf('{%s}', $matches['list']),
                    $element,
                    $id
                )
            ] = $element;
        }

        return $ids;
    }
23658
public static function optionsUsers(): array
    {
        $options = ['' => '-'];

        foreach ((new UserService())->all() as $user) {
            $options[$user->userName()] = $user->realName() . ' - ' . $user->userName();
        }

        return $options;
    }
474387
public static function parentList() {
		if(!static::$arrParentsLoaded) {
			$parents = \Database::getInstance()->prepare("SELECT * FROM tl_member ORDER BY lastname, username")->execute();
			while ($parent = $parents->fetchAssoc()) {
				if($parent['groups'] && in_array(static::getGroupIdFor('parents'),unserialize($parent['groups'])))
					static::$arrParents[$parent['id']] = $parent['username'];
			}
			static::$arrParentsLoaded = true;
		}
		return static::$arrParents;
	}
838456
public function getUserGroupNames()
    {
        /** @var OxpsPaymorrowOxUser|oxUser $this */

        /** @var oxList $oGroups */
        if ( !( $oGroups = $this->getUserGroups() ) ) {
            return '';
        }

        $aGroups = array();

        foreach ( $oGroups as $oGroup ) {
            if ( $this->_isGroupValid( $oGroup ) ) {
                $aGroups[] = $oGroup->oxgroups__oxtitle->value;
            }
        }

        return implode( ', ', $aGroups );
    }
380899
protected function getStringConnectionsArray()
	{
		$processor = new AnydatasetFilenameProcessor("_db");
		$processor->UseFileFromAnyLanguage();
		$anydata = new AnyDataset($processor->FullQualifiedNameAndPath());
		$it = $anydata->getIterator();
		$ret = array();
		$ret[''] = '-- Default UsersAnydataSet --';
		while ($it->hasNext())
		{
			$sr = $it->moveNext();
			$ret[$sr->getField("dbname")] = $sr->getField("dbname");
		}

		return $ret;
	}
118722
private function sessions() : array
    {
        if (!empty($sessions)) return $sessions;

        $returnSessions = [];

        $sessions = $this->get(sprintf(Session::SESSION_ENDPOINT, $this->onlineIdParameter), [
            'fields' => '@default,npTitleDetail,npTitleDetail.platform,sessionName,sessionCreateTimestamp,availablePlatforms,members,memberCount,sessionMaxUser',
            'titleIconSize' => 's',
            'npLanguage' => 'en'
        ]);

        if ($sessions->size === 0) return null;

        // Multiple sessions could be used if the user is in a party while playing a game.
        foreach ($sessions->sessions as $session) {
            $returnSessions[] = new Session($this->client, $session);
        }

        $sessions = $returnSessions;

        return $returnSessions;
    }
354288
public function getData()
    {
        return [
            'user___user__view_profile' => 'View user profile',
            'user___user__view_own_profile' => [
                'type' => Item::TYPE_PERMISSION,
                'description' => 'View user own profile',
                'rule' => new UpdateOwnDataRule(),
                'children' => ['user___user__view_profile']
            ],
            'user' => [
                'type' => Item::TYPE_ROLE,
                'description' => 'User',
                'children' => ['user___user__view_own_profile'],
            ],
            'admin' => [
                'type' => Item::TYPE_ROLE,
                'description' => 'Admin',
                'children' => ['user___user__view_profile']
            ],
            'owner' => [
                'type' => Item::TYPE_ROLE,
                'description' => 'Application owner',
                'children' => ['admin'],
            ]
        ];
    }
1199941
public function getRegexes() : array
    {
        return [
            $this->getPhoneNumbers(),                        
            $this->getUrls(),            
            $this->getEmoticons(),            
            $this->getHashTags(),           
            $this->getAsciiArrows(),            
            $this->getUsernames(),
            $this->getHashTags(),            
            $this->getWordsWith(),
            $this->getNumbers(),            
            $this->getWordsWithout(),            
            $this->getEllipsisDots(),            
            $this->getEverythingElse()
        ];
    }
1022642
public function toArray()
    {
        return [
            'id' => $this->getId(),
            'nav_id' => $this->getNavId(),
            'lang' => $this->getLang(),
            'link' => $this->getLink(),
            'title' => Yii::$app->menu->encodeValue($this->title),
            'title_tag' => Yii::$app->menu->encodeValue($this->title),
            'alias' => $this->getAlias(),
            'description' => Yii::$app->menu->encodeValue($this->description),
            'keywords' => null,
            'create_user_id' => $this->createUserId,
            'update_user_id' => $this->updateUserId,
            'timestamp_create' => $this->getTimestampCreate(),
            'timestamp_update' => $this->getTimestampUpdate(),
            'is_home' => $this->getIsHome(),
            'parent_nav_id' => $this->getParentNavId(),
            'sort_index' => $this->sortIndex,
            'is_hidden' => (bool) $this->isHidden,
            'type' => $this->getType(),
            'redirect' => $this->getRedirect(),
            'container' => $this->getContainer(),
            'depth' => $this->getDept(),
        ];
    }
502625
public function getUserFlags() : array
    {
        if ($this->flags !== null) {
            return $this->flags;
        }

        $this->flags = [];
        $usergroups = $this->usergroups;

        foreach ($usergroups as $usergroup) {
            $group = $usergroup->group;
            $flags = $group->flags;

            if (!empty($flags)) {
                $this->flags = array_merge($this->flags, $flags);
            }
        }

        return $this->flags;
    }
818319
public function getCurrentUserPrincipals()
    {
        $currentUser = $this->getCurrentUserPrincipal();

        if (is_null($currentUser)) {
            return [];
        }

        return array_merge(
            [$currentUser],
            $this->getPrincipalMembership($currentUser)
        );
    }
459338
public function rules()
    {

        //$userRepository = new UserRepository($this->app);
        $user = $this->users->findBy('id', $this->route('user'));

        return [
            'username' => 'required|max:255|unique:users,username,'.$user->id,
            'email' => 'required|email|max:255|unique:users,email,'.$user->id,
        ];
    }
382610
public function getExcludeUserIds()
    {
        $userIds = array();
        $currentGroupId = -1;
        //First of all we need to test if subject is group or user
        //In case of group we need to exclude all these users that already exist in role
        if ($this->receiverGroup !== null) {
            $currentGroupId = $this->receiverGroup->getId();
            $roleUsers = $this->role->getUsers();
            foreach ($roleUsers as $user) {
                array_push($userIds, $user->getId());
            }
        }

        //For both cases (user or group) we need to exclude all users already enrolled in other groups
        $roleGroups = $this->role->getGroups();

        if ($roleGroups) {
            foreach ($roleGroups as $group) {
                if ($group->getId() != $currentGroupId) {
                    $userIds = array_merge($userIds, $group->getUserIds());
                }
            }
        }
        $userIds = array_unique($userIds);

        return $userIds;
    }
785134
private function getBelongTo(): array
    {
        $result = [];

        if (! isset($this->capabilities['action'][Utils::getTypeBelongs()])) {
            return $result;
        }

        $table = TableRegistry::getTableLocator()->get('RolesCapabilities.Capabilities');
        Assert::isInstanceOf($table, CapabilitiesTable::class);

        $groups = $table->getUserGroups($this->user['id']);
        // check user capabilities against action's belongs capabilities
        foreach ($this->capabilities['action'][Utils::getTypeBelongs()] as $capability) {
            if (in_array($capability->getName(), $this->capabilities['user'])) {
                // if user has owner capability for current action add appropriate conditions to where clause
                $result[$this->table->aliasField($capability->getField()) . ' IN'] = array_keys($groups);
            }
        }

        return $result;
    }
867639
public function toArray()
    {
        return [
            'userAgent'    => $this->userAgent,
            'version'      => $this->version,
            'majorVersion' => $this->majorVersion,
            'minorVersion' => $this->minorVersion,
            'patchVersion' => $this->patchVersion,
            'debug'        => $this->debug,
            'platform'     => $this->platform,
            'device'       => $this->device,
        ];
    }
74698
public function roles() {
		$user = $this->user();
		if (!$user) {
			return [];
		}

		$roles = $this->_getUserRoles($user);

		return $roles;
	}
899425
public function getUsersGender()
    {
        $period = $this->analyticsDuration();

        $data = Analytics::performQuery($period, 'ga:sessions', ['dimensions' => 'ga:userGender']);

        $items = [];
        $rows = $data->rows;
        if (is_null($rows)) {
            return [];
        }
        shuffle($rows); // shuffle results / randomimize chart color sections
        foreach ($rows as $k => $item) {
            $items[] = $this->getPieDataSet(ucfirst($item[0]), $item[1]);
        }

        return $items;
    }