def all_users(client):
    """Retrieves all user data

    Args:
        client: pymongo client used to connect to mongodb database

    Return:
        users: json object containing a all user data denoted by their
        associated id

    """
    users = []
    for user in client.db.user.find():
        users.append(user)
    return users