def construct_user_data(user=None):
    """Return dict with user data

    The returned keys are the bare minimum: username, first_name, last_name
    and email. No permissions or is_superuser flags!

    """
    user_data = {}
    for key in ["username", "first_name", "last_name", "email"]:
        user_data[key] = getattr(user, key)
    return user_data