You are here

function ldap_servers_update_8402 in Lightweight Directory Access Protocol (LDAP) 8.4

Corrects a configuration field type.

File

ldap_servers/ldap_servers.install, line 129

Code

function ldap_servers_update_8402() {
  $config_factory = \Drupal::configFactory();
  $config_old = $config_factory
    ->getEditable('ldap_help.settings');
  if ($config_old) {
    $config_new = $config_factory
      ->getEditable('ldap_servers.settings');
    $config_new
      ->set('watchdog_detail', $config_old
      ->get('watchdog_detail'));
    $config_new
      ->save();
    $config_old
      ->delete();
  }
}