You are here

function acsf_sso_update_8001 in Acquia Cloud Site Factory Connector 8.2

Same name and namespace in other branches
  1. 8 acsf_sso/acsf_sso.install \acsf_sso_update_8001()

Updates settings.

File

acsf_sso/acsf_sso.install, line 117
The install tasks of the acsf_sso module.

Code

function acsf_sso_update_8001() {
  $site = AcsfSite::load();
  $config = \Drupal::configFactory()
    ->getEditable('samlauth.authentication');
  $update = [
    'sync_name' => 1,
    'sync_mail' => 1,
    'strict' => 1,
    'idp_entity_id' => $site->factory_url . '/sso/saml2/idp/metadata.php',
  ];
  foreach ($update as $key => $sso_config) {
    $config
      ->set($key, $sso_config);
  }
  $config
    ->save();
}