def update_user_data():
    'Update user_data to enable or disable Telemetry.\n\n    If employment data has been changed Telemetry might be switched on\n    automatically. The opt-in decision is taken for the new employee. Non employees\n    will have an option to enable data collection.\n    '
    is_employee_changed = user_data.set_user_data()
    if (not is_employee_changed):
        return
    if user_data.is_employee:
        logger.warning('Enabled collecting MozPhab usage data.\nSee https://moz-conduit.readthedocs.io/en/latest/mozphab-data-collection.html')
        config.telemetry_enabled = True
    else:
        opt_in = (prompt('Would you like to allow MozPhab to collect usage data?', ['Yes', 'No']) == 'Yes')
        if opt_in:
            config.telemetry_enabled = True
        else:
            logger.info('MozPhab usage data collection disabled.\nSee https://moz-conduit.readthedocs.io/en/latest/mozphab-data-collection.html')
            config.telemetry_enabled = False
    config.write()
Update user_data to enable or disable Telemetry.

If employment data has been changed Telemetry might be switched on
automatically. The opt-in decision is taken for the new employee. Non employees
will have an option to enable data collection.
def update_user_data():
    'Update user_data to enable or disable Telemetry.\n\n    If employment data has been changed Telemetry might be switched on\n    automatically. The opt-in decision is taken for the new employee. Non employees\n    will have an option to enable data collection.\n    '
    is_employee_changed = user_data.set_user_data()
    if (not is_employee_changed):
        return
    if user_data.is_employee:
        logger.warning('Enabled collecting MozPhab usage data.\nSee https://moz-conduit.readthedocs.io/en/latest/mozphab-data-collection.html')
        config.telemetry_enabled = True
    else:
        opt_in = (prompt('Would you like to allow MozPhab to collect usage data?', ['Yes', 'No']) == 'Yes')
        if opt_in:
            config.telemetry_enabled = True
        else:
            logger.info('MozPhab usage data collection disabled.\nSee https://moz-conduit.readthedocs.io/en/latest/mozphab-data-collection.html')
            config.telemetry_enabled = False
    config.write()