function ldap_sso_update_8001 in LDAP Single Sign On 8
Same name and namespace in other branches
- 8.4 ldap_sso.install \ldap_sso_update_8001()
Moves SSO to own schema.
File
- ./
ldap_sso.install, line 11 - Update calls for ldap_sso.
Code
function ldap_sso_update_8001() {
$config_factory = \Drupal::configFactory();
$config_old = $config_factory
->getEditable('ldap_authentication.settings');
$config_new = $config_factory
->getEditable('ldap_sso.settings');
$config_new
->set('ssoExcludedPaths', $config_old
->get('ssoExcludedPaths'));
$config_new
->set('ssoExcludedHosts', $config_old
->get('ssoExcludedHosts'));
$config_new
->set('ssoRemoteUserStripDomainName', $config_old
->get('ssoRemoteUserStripDomainName'));
$config_new
->set('seamlessLogin', $config_old
->get('seamlessLogin'));
$config_new
->set('cookieExpire', $config_old
->get('cookieExpire'));
$config_new
->set('ldapImplementation', $config_old
->get('ldapImplementation'));
$config_new
->save(TRUE);
$config_old
->clear('ssoExcludedPaths');
$config_old
->clear('ssoExcludedHosts');
$config_old
->clear('seamlessLogin');
$config_old
->clear('ssoRemoteUserStripDomainName');
$config_old
->clear('cookieExpire');
$config_old
->clear('ldapImplementation');
$config_old
->save(TRUE);
}