def user_query(username, email):
    """
    Find a user match with username and email
    :param username:
    :param email:
    :returns:
    """
    query = db.query(User)
    if username:
        query = query.filter_by(username=username)

    if email:
        query = query.filter_by(username=username)

    return query