From d4a804e3be2f329f0aa3f54ff8e03c7fe5b767f5 Mon Sep 17 00:00:00 2001 From: protitude Date: Sat, 20 Jul 2024 10:34:09 -0600 Subject: [PATCH] add some comments --- oit.module | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oit.module b/oit.module index f28aa66..a5295b5 100644 --- a/oit.module +++ b/oit.module @@ -279,12 +279,14 @@ function oit_form_alter(&$form, FormStateInterface $form_state, $form_id) { break; case "user_login_form": + // Remove any messages so they don't show up after login. \Drupal::messenger()->deleteAll(); $config = \Drupal::config('oit.settings'); $show_login_form = $config->get('show_login_form'); $form['login_words']['#markup'] = '
'; $form['login_words']['#weight'] = -10; if (!$show_login_form) { + // Cache is breaking the redirect, so kill it. \Drupal::service('page_cache_kill_switch')->trigger(); $dest_get = Xss::filter(\Drupal::request()->get('destination')); $destination = !empty($dest_get) ? '?destination=' . $dest_get : '';