We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ecca751 commit 16d0cfcCopy full SHA for 16d0cfc
app/code/Magento/Newsletter/Model/Subscriber.php
@@ -628,7 +628,7 @@ public function loadByCustomerId($customerId)
628
$customer = $this->customerRepository->getById($customerId);
629
$websiteId = (int)$this->_storeManager->getStore()->getWebsiteId();
630
$this->loadByCustomer((int)$customerId, $websiteId);
631
- if ($customer->getId() && !$this->getCustomerId()) {
+ if ($this->getId() && $customer->getId() && !$this->getCustomerId()) {
632
$this->setCustomerId($customer->getId());
633
$this->setSubscriberConfirmCode($this->randomSequence());
634
$this->save();
0 commit comments