public function SocialAuthSettingsForm::submitForm in Social Auth 8.2
Same name and namespace in other branches
- 8 src/Form/SocialAuthSettingsForm.php \Drupal\social_auth\Form\SocialAuthSettingsForm::submitForm()
- 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 145
Class
- SocialAuthSettingsForm
- Defines a form that configures Social Auth settings.
Namespace
Drupal\social_auth\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$values = $form_state
->getValues();
$this
->config('social_auth.settings')
->set('post_login', $values['post_login'])
->set('user_allowed', $values['user_allowed'])
->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);
}