Style nitpick: this is short enough to be one line:

    return User.objects.filter(id__in=ids).order_by('username')