You are here

function social_core_update_8501 in Open Social 8.8

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_core/social_core.install \social_core_update_8501()
  2. 8.5 modules/social_features/social_core/social_core.install \social_core_update_8501()
  3. 8.6 modules/social_features/social_core/social_core.install \social_core_update_8501()
  4. 8.7 modules/social_features/social_core/social_core.install \social_core_update_8501()
  5. 10.3.x modules/social_features/social_core/social_core.install \social_core_update_8501()
  6. 10.0.x modules/social_features/social_core/social_core.install \social_core_update_8501()
  7. 10.1.x modules/social_features/social_core/social_core.install \social_core_update_8501()
  8. 10.2.x modules/social_features/social_core/social_core.install \social_core_update_8501()

Install social_lets_connect_usage module.

File

modules/social_features/social_core/social_core.install, line 921
Install, update and uninstall functions for the social_core module.

Code

function social_core_update_8501() {

  // Let's enable the sharing usage data module.
  $modules = [
    'social_lets_connect_usage',
  ];
  \Drupal::service('module_installer')
    ->install($modules);

  // Let's disable sharing data by default for existing sites because this
  // changes behaviour. For new installs this will be enabled through settings.
  $config = \Drupal::configFactory()
    ->getEditable('social_lets_connect_usage.settings');
  $config
    ->set('usage_data_enabled', 0);
  $config
    ->save();
}