def format_user(user):
    """Formats the results to a dictionary"""

    details = {
        "id": user[0],
        "username": user[1],
        "password": user[2],
        "role": user[3],
        "created_by": user[4],
        "created_at": str(user[5])
    }
    return details