Skip to content

Commit 6a72ec6

Browse files
committed
handle action which doesn't implements AccountInterface
1 parent 0105d37 commit 6a72ec6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Plugin/SessionChecker.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
namespace Opengento\Gdpr\Plugin;
99

1010
use Magento\Customer\Controller\AccountInterface;
11+
use Magento\Customer\Controller\Address;
1112
use Magento\Customer\Model\Session;
13+
use Magento\Framework\App\Action\AbstractAction;
1214
use Magento\Framework\App\ActionInterface;
1315
use Magento\Framework\Exception\LocalizedException;
1416
use Magento\Framework\Message\ManagerInterface;
@@ -78,6 +80,9 @@ public function aroundExecute(ActionInterface $action, callable $proceed, ...$ar
7880
if ($action instanceof AccountInterface) {
7981
return $this->session->authenticate();
8082
}
83+
if ($action instanceof AbstractAction) {
84+
$action->dispatch($action->getRequest());
85+
}
8186
}
8287

8388
return $proceed(...$arguments);

0 commit comments

Comments
 (0)