Skip to content

Commit 7abae2d

Browse files
committed
NemID fields populate caching issue
1 parent 204250d commit 7abae2d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ before starting to add changes. Use example [placed in the end of the page](#exa
1111

1212
## [Unreleased]
1313

14+
- Fixed NemID fields populate caching issue
15+
1416
- Fixed issue with wrong authorization provider used when multiple are enabled
1517

1618
## [3.8.0] 2023-07-12

modules/os2forms_nemid/src/EventSubscriber/NemloginRedirectSubscriber.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ public function redirectToNemlogin(GetResponseEvent $event) {
147147
return;
148148
}
149149

150+
// Killing cache on webform so that populated values are never cached.
151+
$this->pageCacheKillSwitch->trigger();
152+
150153
$webformNemidSettings = $webform->getThirdPartySetting('os2forms', 'os2forms_nemid');
151154

152155
// Getting nemlogin_auto_redirect setting.
@@ -156,10 +159,6 @@ public function redirectToNemlogin(GetResponseEvent $event) {
156159
}
157160
// Checking if $nemlogin_auto_redirect is on.
158161
if ($nemlogin_auto_redirect) {
159-
// Killing cache so that positive or negative redirect decision is not
160-
// cached.
161-
$this->pageCacheKillSwitch->trigger();
162-
163162
// Getting auth plugin ID override.
164163
$authPluginId = NULL;
165164
if (isset($webformNemidSettings['session_type']) && !empty($webformNemidSettings['session_type'])) {

0 commit comments

Comments
 (0)