You are here

function social_auth_extra_form_user_admin_settings_alter in Open Social 8

Same name and namespace in other branches
  1. 8.9 modules/custom/social_auth_extra/social_auth_extra.module \social_auth_extra_form_user_admin_settings_alter()
  2. 8.2 modules/custom/social_auth_extra/social_auth_extra.module \social_auth_extra_form_user_admin_settings_alter()
  3. 8.3 modules/custom/social_auth_extra/social_auth_extra.module \social_auth_extra_form_user_admin_settings_alter()
  4. 8.4 modules/custom/social_auth_extra/social_auth_extra.module \social_auth_extra_form_user_admin_settings_alter()
  5. 8.5 modules/custom/social_auth_extra/social_auth_extra.module \social_auth_extra_form_user_admin_settings_alter()
  6. 8.6 modules/custom/social_auth_extra/social_auth_extra.module \social_auth_extra_form_user_admin_settings_alter()
  7. 8.7 modules/custom/social_auth_extra/social_auth_extra.module \social_auth_extra_form_user_admin_settings_alter()
  8. 8.8 modules/custom/social_auth_extra/social_auth_extra.module \social_auth_extra_form_user_admin_settings_alter()

Implements hook_form_FORM_ID_alter() for user_admin_settings().

File

modules/custom/social_auth_extra/social_auth_extra.module, line 332
Contains social_auth_extra.module.

Code

function social_auth_extra_form_user_admin_settings_alter(&$form, FormStateInterface $form_state, $form_id) {
  $config = \Drupal::config('social_auth_extra.mail');
  $form['email_social_login'] = [
    '#type' => 'details',
    '#title' => t('Welcome (registration with social network)'),
    '#description' => t('This message will be sent to users when users will be registered with a social network account.'),
    '#group' => 'email',
    '#tree' => TRUE,
    '#weight' => -10,
  ];
  $form['email_social_login']['subject'] = [
    '#type' => 'textfield',
    '#title' => t('Subject'),
    '#maxlength' => 180,
    '#default_value' => $config
      ->get('email_social_login.subject'),
  ];
  $form['email_social_login']['body'] = [
    '#type' => 'textarea',
    '#title' => t('Body'),
    '#rows' => 8,
    '#default_value' => $config
      ->get('email_social_login.body'),
  ];
  $form['#submit'][] = 'social_auth_extra_form_user_admin_settings_submit';
}