Skip to content

Commit

Permalink
oit: disable cache on login form
Browse files Browse the repository at this point in the history
  • Loading branch information
protitude committed Jul 18, 2024
1 parent 4851e23 commit 077d88f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oit.module
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ function oit_form_alter(&$form, FormStateInterface $form_state, $form_id) {
$form['login_words']['#markup'] = '<div class="login_text"></div>';
$form['login_words']['#weight'] = -10;
if (!$show_login_form) {
$form['#cache'] = ['max-age' => 0];
\Drupal::service('page_cache_kill_switch')->trigger();
$dest_get = Xss::filter(\Drupal::request()->get('destination'));
$destination = !empty($dest_get) ? '?destination=' . $dest_get : '';
$response = new RedirectResponse('/saml_login' . $destination, 301);
Expand Down

0 comments on commit 077d88f

Please sign in to comment.