Skip to content

Commit 16d0cfc

Browse files
committed
MC-4242: Newsletter subscriptions per website
1 parent ecca751 commit 16d0cfc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Newsletter/Model/Subscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ public function loadByCustomerId($customerId)
628628
$customer = $this->customerRepository->getById($customerId);
629629
$websiteId = (int)$this->_storeManager->getStore()->getWebsiteId();
630630
$this->loadByCustomer((int)$customerId, $websiteId);
631-
if ($customer->getId() && !$this->getCustomerId()) {
631+
if ($this->getId() && $customer->getId() && !$this->getCustomerId()) {
632632
$this->setCustomerId($customer->getId());
633633
$this->setSubscriberConfirmCode($this->randomSequence());
634634
$this->save();

0 commit comments

Comments
 (0)