You are here

public function LdapSsoAdminForm::submitForm in LDAP Single Sign On 8

Same name and namespace in other branches
  1. 8.4 src/Form/LdapSsoAdminForm.php \Drupal\ldap_sso\Form\LdapSsoAdminForm::submitForm()

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides ConfigFormBase::submitForm

File

src/Form/LdapSsoAdminForm.php, line 205

Class

LdapSsoAdminForm
Provides the configuration form SSO under LDAP configuration.

Namespace

Drupal\ldap_sso\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $this
    ->config('ldap_sso.settings')
    ->set('ssoExcludedPaths', LdapAuthenticationConfiguration::linesToArray($values['ssoExcludedPaths']))
    ->set('ssoExcludedHosts', LdapAuthenticationConfiguration::linesToArray($values['ssoExcludedHosts']))
    ->set('seamlessLogin', $values['seamlessLogin'])
    ->set('ssoSplitUserRealm', $values['ssoSplitUserRealm'])
    ->set('ssoRemoteUserStripDomainName', $values['ssoRemoteUserStripDomainName'])
    ->set('cookieExpire', $values['cookieExpire'])
    ->set('ssoVariable', $values['ssoVariable'])
    ->set('redirectOnLogout', $values['redirectOnLogout'])
    ->set('logoutRedirectPath', $values['logoutRedirectPath'])
    ->set('enableLoginConfirmationMessage', $values['enableLoginConfirmationMessage'])
    ->save();
}