You are here

public function SocialAuthSettingsForm::submitForm in Social Auth 8

Same name and namespace in other branches
  1. 8.2 src/Form/SocialAuthSettingsForm.php \Drupal\social_auth\Form\SocialAuthSettingsForm::submitForm()
  2. 3.x src/Form/SocialAuthSettingsForm.php \Drupal\social_auth\Form\SocialAuthSettingsForm::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/SocialAuthSettingsForm.php, line 155

Class

SocialAuthSettingsForm
Defines a form that configures Social Auth settings.

Namespace

Drupal\social_auth\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $this
    ->config('social_auth.settings')
    ->set('post_login', $values['post_login'])
    ->set('redirect_user_form', $values['redirect_user_form'])
    ->set('disable_admin_login', $values['disable_admin_login'])
    ->set('disabled_roles', $values['disabled_roles'])
    ->save();
  parent::submitForm($form, $form_state);
}