Skip to content

Commit a28bb7d

Browse files
committed
ACP2E-2070: Wrong X-Magento-Vary after logging-in to the customer account
1 parent adc4105 commit a28bb7d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/Customer/Model/App/Action/ContextPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function beforeExecute(ActionInterface $subject)
4848
{
4949
$this->httpContext->setValue(
5050
Context::CONTEXT_GROUP,
51-
$this->customerSession->getCustomerGroupId(),
51+
(string)$this->customerSession->getCustomerGroupId(),
5252
GroupManagement::NOT_LOGGED_IN_ID
5353
);
5454
$this->httpContext->setValue(

app/code/Magento/Customer/Model/Session.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public function setCustomerData(CustomerData $customer)
211211
} else {
212212
$this->_httpContext->setValue(
213213
Context::CONTEXT_GROUP,
214-
$customer->getGroupId(),
214+
(string)$customer->getGroupId(),
215215
\Magento\Customer\Model\Group::NOT_LOGGED_IN_ID
216216
);
217217
$this->setCustomerId($customer->getId());
@@ -271,7 +271,7 @@ public function setCustomer(Customer $customerModel)
271271
$this->_customerModel = $customerModel;
272272
$this->_httpContext->setValue(
273273
Context::CONTEXT_GROUP,
274-
$customerModel->getGroupId(),
274+
(string)$customerModel->getGroupId(),
275275
\Magento\Customer\Model\Group::NOT_LOGGED_IN_ID
276276
);
277277
$this->setCustomerId($customerModel->getId());

0 commit comments

Comments
 (0)