canEdit()) { $group->profile_widgets = $profile_widgets; if ($group->save()) { $forward_url = $group->getURL(); system_message(elgg_echo("group_tools:action:success")); } else { register_error(elgg_echo("group_tools:action:error:save")); } } else { register_error(elgg_echo("group_tools:action:error:entity")); } } else { register_error(elgg_echo("group_tools:action:error:input")); } forward($forward_url);