public function addConfigValuesFromSystemSettings($configValues, $systemSettings)
    {
        foreach ($systemSettings as $pluginSetting) {
            $pluginName = $pluginSetting->getPluginName();

            if (empty($pluginName)) {
                continue;
            }

            if (!array_key_exists($pluginName, $configValues)) {
                $configValues[$pluginName] = array();
            }

            foreach ($pluginSetting->getSettingsWritableByCurrentUser() as $setting) {

                $name = $setting->getName();

                $configSection = $pluginName;

                if ($setting instanceof PiwikSettings\Plugin\SystemConfigSetting) {
                    $configSection = $setting->getConfigSectionName();

                    if ($this->shouldSkipCategory($configSection)) {
                        continue;
                    }
                }

                $config = $setting->configureField();

                $description = '';
                if (!empty($config->description)) {
                    $description .= $config->description . ' ';
                }

                if (!empty($config->inlineHelp)) {
                    $description .= $config->inlineHelp;
                }

                if (isset($configValues[$configSection][$name])) {
                    $configValues[$configSection][$name]['defaultValue'] = $setting->getDefaultValue();
                    $configValues[$configSection][$name]['description']  = trim($description);

                    if ($config->uiControl === PiwikSettings\FieldConfig::UI_CONTROL_PASSWORD) {
                        $configValues[$configSection][$name]['value'] = $this->getMaskedPassword();
                    }
                } else {
                    $defaultValue = $setting->getValue();
                    $configValues[$configSection][$name] = array(
                        'value' => null,
                        'description' => trim($description),
                        'isCustomValue' => false,
                        'defaultValue' => $defaultValue
                    );
                }
            }

            if (empty($configValues[$pluginName])) {
                unset($configValues[$pluginName]);
            }
        }

        return $configValues;
    }