protected function getGroups(Table $table): array
    {
        /**
         * @var \Cake\ORM\Query $query
         */
        $query = $table->find('all')
            ->where(['remote_group_id IS NOT NULL', 'remote_group_id !=' => ''])
            ->contain(['Users' => function ($q) {
                return $q->select(['Users.username']);
            }]);
        /**
         * @var array $result
         */
        $result = $query->all();

        return $result;
    }