Skip to content

Commit dbced45

Browse files
anvasilievmage2pratik
authored andcommitted
Fix confirmation for registered customer
1 parent 9317c4f commit dbced45

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
@@ -426,13 +426,7 @@ public function subscribe($email)
426426
|| $this->getStatus() == self::STATUS_NOT_ACTIVE
427427
) {
428428
if ($isConfirmNeed === true) {
429-
// if user subscribes own login email - confirmation is not needed
430-
$isOwnSubscribes = $isSubscribeOwnEmail;
431-
if ($isOwnSubscribes == true) {
432-
$this->setStatus(self::STATUS_SUBSCRIBED);
433-
} else {
434-
$this->setStatus(self::STATUS_NOT_ACTIVE);
435-
}
429+
$this->setStatus(self::STATUS_NOT_ACTIVE);
436430
} else {
437431
$this->setStatus(self::STATUS_SUBSCRIBED);
438432
}
@@ -458,9 +452,7 @@ public function subscribe($email)
458452
try {
459453
/* Save model before sending out email */
460454
$this->save();
461-
if ($isConfirmNeed === true
462-
&& $isOwnSubscribes === false
463-
) {
455+
if ($isConfirmNeed === true) {
464456
$this->sendConfirmationRequestEmail();
465457
} else {
466458
$this->sendConfirmationSuccessEmail();

0 commit comments

Comments
 (0)