public function updateUserSettings(FilterUserFieldsEvent $userfields_filter)
    {
        $settings_manager = $userfields_filter->getContainer()->get('acs.setting_manager');

        $user = $userfields_filter->getContainer()->get('security.context')->getToken()->getUser();

        $fields_template = $userfields_filter->getUserFields();

        //if($settings_manager->isUpdateAvailable($user, 'user_schema_version', $fields_template['user_schema_version']['default_value'])){
            // We have an update in the user fields
            $settings_manager->loadSettingDefaults($fields_template, $user);
        //}
    }
public function updateUserSettings(FilterUserFieldsEvent $userfields_filter)
    {
        $settings_manager = $userfields_filter->getContainer()->get('acs.setting_manager');

        $user = $userfields_filter->getContainer()->get('security.context')->getToken()->getUser();

        $fields_template = $userfields_filter->getUserFields();

        //if($settings_manager->isUpdateAvailable($user, 'user_schema_version', $fields_template['user_schema_version']['default_value'])){
            // We have an update in the user fields
            $settings_manager->loadSettingDefaults($fields_template, $user);
        //}
    }
public function updateUserSettings ( FilterUserFieldsEvent $ userfields_filter ) { $ settings_manager = $ userfields_filter -> getContainer ( ) -> get ( 'acs.setting_manager' ) ; $ user = $ userfields_filter -> getContainer ( ) -> get ( 'security.context' ) -> getToken ( ) -> getUser ( ) ; $ fields_template = $ userfields_filter -> getUserFields ( ) ; //if($settings_manager->isUpdateAvailable($user, 'user_schema_version', $fields_template['user_schema_version']['default_value'])){ // We have an update in the user fields $ settings_manager -> loadSettingDefaults ( $ fields_template , $ user ) ; //} }
Create new added fields to user or missing fields
Create new added fields to user or missing fields