async def find_user_by_cards(app, cards, fields=["username"]):
    """Find a user by a list of cards assigned to them.

    Parameters
    ----------
    app : aiohttp.web.Application
        The aiohttp application instance
    cards : list
        The list of cards to search for
    fields : list, default=["username"]
        The fields to be returned in the user document
    Returns
    -------
    user : dict
        The user document
    """
    if not isinstance(cards, list):
        cards = [cards]
    projection = {}
    for field in fields:
        projection[field] = 1
    if "_id" not in fields:
        projection["_id"] = 0
    return await app["db"].users.find_one({"cards": cards}, projection)