Index: branches/RC/core/units/general/helpers/sections_helper.php =================================================================== diff -u -r11129 -r11135 --- branches/RC/core/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 11129) +++ branches/RC/core/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 11135) @@ -181,10 +181,6 @@ $current_data = isset($this->Tree[$section_name]) ? $this->Tree[$section_name] : Array(); - if ($section_name == 'in-portal:system') { - echo ''; - } - $this->Tree[$section_name] = array_merge_recursive2($current_data, $section_params); } } Index: branches/RC/core/units/admin/admin_events_handler.php =================================================================== diff -u -r10954 -r11135 --- branches/RC/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 10954) +++ branches/RC/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 11135) @@ -1117,7 +1117,7 @@ list($usec, $sec) = explode(' ', microtime()); return ((float)$usec + (float)$sec); } - + /** * Occurs after unit config cache was successfully rebuilt * @@ -1126,6 +1126,27 @@ function OnAfterCacheRebuild(&$event) { - } + } + /** + * Removes "Community -> Groups" section when it is not allowed + * + * @param kEvent $event + */ + function OnAfterConfigRead(&$event) + { + parent::OnAfterConfigRead($event); + + if (!$this->Application->ConfigValue('AdvancedUserManagement')) { + $section_ajustments = $this->Application->getUnitOption($event->Prefix, 'SectionAdjustments'); + if (!$section_ajustments) { + $section_ajustments = Array (); + } + + $section_ajustments['in-portal:user_groups'] = 'remove'; + + $this->Application->setUnitOption($event->Prefix, 'SectionAdjustments', $section_ajustments); + } + } + } \ No newline at end of file