protected function syncGroupUsers(Table $table, EntityInterface $group, array $users): bool
    {
        $userIds = [];
        foreach ($users as $user) {
            $userIds[] = $user->id;
        }

        if (!empty($group->users)) {
            foreach ($group->users as $user) {
                $userIds[] = $user->id;
            }
        }

        $data = [
            'users' => [
                '_ids' => $userIds
            ]
        ];

        $group = $table->patchEntity($group, $data);
        $result = empty($table) ? false : true;

        return $result;
    }