public function printUsers($username, $start_from, $sort_by, $sort_dir, $show_group)
    {
        $userlist_data = [];

        $username = Container::get('hooks')
            ->fire('model.userlist.print_users_start', $username, $start_from, $sort_by, $sort_dir, $show_group);

        // Retrieve a list of user IDs, LIMIT is (really) expensive so we only fetch the
        // IDs here then later fetch the remaining data
        $result = DB::forTable('users')
            ->select('u.id')
            ->tableAlias('u')
            ->whereGt('u.id', 1)
            ->whereNotEqual('u.group_id', ForumEnv::get('FEATHER_UNVERIFIED'));

        if ($username != '') {
            $result = $result->whereLike('u.username', str_replace('*', '%', $username));
        }
        if ($show_group > -1) {
            $result = $result->where('u.group_id', $show_group);
        }

        $result = $result->orderByExpr($sort_by . ' ' . $sort_dir)
            ->orderByAsc('u.id')
            ->limit(50)
            ->offset($start_from);

        $result = Container::get('hooks')->fireDB('model.userlist.print_users_query', $result);
        $result = $result->findMany();

        if ($result) {
            $user_ids = [];
            foreach ($result as $cur_user_id) {
                $user_ids[] = $cur_user_id['id'];
            }

            // Grab the users
            $result['select'] = ['u.id', 'u.username', 'u.title', 'u.num_posts', 'u.registered',
                'g.g_id', 'g.g_user_title'];

            $result = DB::forTable('users')
                ->tableAlias('u')
                ->selectMany($result['select'])
                ->leftOuterJoin(DB::prefix() . 'groups', ['g.g_id', '=', 'u.group_id'], 'g')
                ->whereIn('u.id', $user_ids)
                ->orderByExpr($sort_by . ' ' . $sort_dir)
                ->orderByAsc('u.id');
            $result = Container::get('hooks')->fireDB('model.userlist.print_users_grab_query', $result);
            $result = $result->find_many();

            foreach ($result as $user_data) {
                $userlist_data[] = $user_data;
            }
        }

        $userlist_data = Container::get('hooks')->fire('model.userlist.print_users', $userlist_data);

        return $userlist_data;
    }