1 user.admin.inc user_settings_email_submit($form, &$form_state)

Form submission handler for user_settings_email().

File

core/modules/user/user.admin.inc, line 1119
Admin page callbacks for the User module.

Code

function user_settings_email_submit($form, &$form_state) {
  $values = $form_state['values'];

  $config = config('system.core');
  $config->set('user_mail_status_activated_notify', $values['user_mail_status_activated_notify']);
  $config->set('user_mail_status_blocked_notify', $values['user_mail_status_blocked_notify']);
  $config->set('user_mail_status_canceled_notify', $values['user_mail_status_canceled_notify']);
  $config->save();

  $config = config('user.mail');
  $config->set('cancel_confirm_body', $values['user_mail_cancel_confirm_body']);
  $config->set('cancel_confirm_subject', $values['user_mail_cancel_confirm_subject']);
  $config->set('password_reset_body', $values['user_mail_password_reset_body']);
  $config->set('password_reset_subject', $values['user_mail_password_reset_subject']);
  $config->set('register_admin_created_body', $values['user_mail_register_admin_created_body']);
  $config->set('register_admin_created_subject', $values['user_mail_register_admin_created_subject']);
  $config->set('register_no_approval_required_body', $values['user_mail_register_no_approval_required_body']);
  $config->set('register_no_approval_required_subject', $values['user_mail_register_no_approval_required_subject']);
  $config->set('register_pending_approval_body', $values['user_mail_register_pending_approval_body']);
  $config->set('register_pending_approval_subject', $values['user_mail_register_pending_approval_subject']);
  $config->set('register_pending_approval_admin_body', $values['user_mail_register_pending_approval_admin_body']);
  $config->set('register_pending_approval_admin_subject', $values['user_mail_register_pending_approval_admin_subject']);
  $config->set('status_activated_body', $values['user_mail_status_activated_body']);
  $config->set('status_activated_subject', $values['user_mail_status_activated_subject']);
  $config->set('status_blocked_body', $values['user_mail_status_blocked_body']);
  $config->set('status_blocked_subject', $values['user_mail_status_blocked_subject']);
  $config->set('status_canceled_body', $values['user_mail_status_canceled_body']);
  $config->set('status_canceled_subject', $values['user_mail_status_canceled_subject']);
  $config->save();

  backdrop_set_message(t('The configuration options have been saved.'));
}