Skip to content

Commit a7061b5

Browse files
committed
Fix confirmation for registered customer
1 parent 48d9e3f commit a7061b5

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

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

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -428,13 +428,7 @@ public function subscribe($email)
428428
|| $this->getStatus() == self::STATUS_NOT_ACTIVE
429429
) {
430430
if ($isConfirmNeed === true) {
431-
// if user subscribes own login email - confirmation is not needed
432-
$isOwnSubscribes = $isSubscribeOwnEmail;
433-
if ($isOwnSubscribes == true) {
434-
$this->setStatus(self::STATUS_SUBSCRIBED);
435-
} else {
436-
$this->setStatus(self::STATUS_NOT_ACTIVE);
437-
}
431+
$this->setStatus(self::STATUS_NOT_ACTIVE);
438432
} else {
439433
$this->setStatus(self::STATUS_SUBSCRIBED);
440434
}
@@ -460,9 +454,7 @@ public function subscribe($email)
460454
try {
461455
/* Save model before sending out email */
462456
$this->save();
463-
if ($isConfirmNeed === true
464-
&& $isOwnSubscribes === false
465-
) {
457+
if ($isConfirmNeed === true) {
466458
$this->sendConfirmationRequestEmail();
467459
} else {
468460
$this->sendConfirmationSuccessEmail();

0 commit comments

Comments
 (0)