Skip to content

Commit 2e517ef

Browse files
committed
Merge remote-tracking branch 'origin/magento/magento2-login-as-customer#186' into login-as-customer-prs
2 parents 796906f + 289d609 commit 2e517ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/code/Magento/LoginAsCustomerFrontendUi/Plugin/InvalidateExpiredSessionPlugin.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ public function beforeExecute(ActionInterface $subject)
6161
$customerId = (int)$this->session->getCustomerId();
6262
if ($adminId && $customerId) {
6363
if (!$this->isLoginAsCustomerSessionActive->execute($customerId, $adminId)) {
64-
$this->session->destroy();
64+
$this->session->clearStorage();
65+
$this->session->expireSessionCookie();
66+
$this->session->regenerateId();
6567
}
6668
}
6769
}

0 commit comments

Comments
 (0)