'Settings will be toggled to database with proper User id'

@staticmethod
def toggle_email_notification_settings(user_id, value):

    events = DataGetter.get_all_events()
    user = DataGetter.get_user(user_id)
    notification_ids = []
    for event in events:
        if (user.is_speaker_at_event(event.id) or user.is_organizer(event.id)):
            email_notification = DataGetter.get_email_notification_settings_by_event_id(user_id, event.id)
            if email_notification:
                email_notification.next_event = value
                email_notification.new_paper = value
                email_notification.session_schedule = value
                email_notification.session_accept_reject = value
                email_notification.after_ticket_purchase = value
                save_to_db(email_notification, 'EmailSettings    Toggled')
                notification_ids.append(email_notification.id)
            else:
                new_email_notification_setting = EmailNotification(next_event=value, new_paper=value, session_schedule=value, session_accept_reject=value, after_ticket_purchase=value, user_id=user_id, event_id=event.id)
                save_to_db(new_email_notification_setting, 'EmailSetting    Toggled')
                notification_ids.append(new_email_notification_setting.id)
    return notification_ids
