diff --git a/config/install/social_auth.settings.yml b/config/install/social_auth.settings.yml index ff8b006..996ea96 100644 --- a/config/install/social_auth.settings.yml +++ b/config/install/social_auth.settings.yml @@ -1,5 +1,5 @@ auth: [] post_login_path: user -redirect_user_form: 0 -disable_admin_login: 1 +redirect_user_form: FALSE +disable_admin_login: TRUE disabled_roles: [] diff --git a/config/schema/social_auth.schema.yml b/config/schema/social_auth.schema.yml index 97d6cf7..cbd3a84 100644 --- a/config/schema/social_auth.schema.yml +++ b/config/schema/social_auth.schema.yml @@ -6,10 +6,10 @@ social_auth.settings: type: string label: 'Drupal path where the user should be redirected after successful login.' redirect_user_form: - type: integer + type: boolean label: 'Redirects to Drupal user form after the user is created if checked.' disable_admin_login: - type: integer + type: boolean label: 'Allows to Disable Social Auth login for administrator' disabled_roles: type: array diff --git a/social_auth.module b/social_auth.module index 3eae4f5..783ab08 100644 --- a/social_auth.module +++ b/social_auth.module @@ -29,8 +29,9 @@ function social_auth_preprocess_login_with(&$variables) { function social_auth_update_8001(&$sandbox) { $config = \Drupal::service('config.factory')->getEditable('social_auth.settings'); // Set and save new message value. - $config->set('post_login_path', 'user')->save(); - $config->set('redirect_user_form', 0)->save(); - $config->set('disable_admin_login', 1)->save(); - $config->set('disabled_roles', array())->save(); + $config->set('post_login_path', 'user') + ->set('redirect_user_form', FALSE) + ->set('disable_admin_login', TRUE) + ->set('disabled_roles', array()) + ->save(); }