@@ -977,7 +977,6 @@ protected function sendEmailConfirmation(CustomerInterface $customer, $redirectU
977977 $ templateType = self ::NEW_ACCOUNT_EMAIL_REGISTERED_NO_PASSWORD ;
978978 }
979979 $ this ->getEmailNotification ()->newAccount ($ customer , $ templateType , $ redirectUrl , $ customer ->getStoreId ());
980- $ customer ->setConfirmation (null );
981980 } catch (MailException $ e ) {
982981 // If we are not able to send a new account email, this should be ignored
983982 $ this ->logger ->critical ($ e );
@@ -1615,37 +1614,6 @@ private function getEmailNotification()
16151614 }
16161615 }
16171616
1618- /**
1619- * Destroy all active customer sessions by customer id (current session will not be destroyed).
1620- *
1621- * Customer sessions which should be deleted are collecting from the "customer_visitor" table considering
1622- * configured session lifetime.
1623- *
1624- * @param string|int $customerId
1625- * @return void
1626- */
1627- private function destroyCustomerSessions ($ customerId )
1628- {
1629- $ this ->sessionManager ->regenerateId ();
1630- $ sessionLifetime = $ this ->scopeConfig ->getValue (
1631- \Magento \Framework \Session \Config::XML_PATH_COOKIE_LIFETIME ,
1632- \Magento \Store \Model \ScopeInterface::SCOPE_STORE
1633- );
1634- $ dateTime = $ this ->dateTimeFactory ->create ();
1635- $ activeSessionsTime = $ dateTime ->setTimestamp ($ dateTime ->getTimestamp () - $ sessionLifetime )
1636- ->format (DateTime::DATETIME_PHP_FORMAT );
1637- /** @var \Magento\Customer\Model\ResourceModel\Visitor\Collection $visitorCollection */
1638- $ visitorCollection = $ this ->visitorCollectionFactory ->create ();
1639- $ visitorCollection ->addFieldToFilter ('customer_id ' , $ customerId );
1640- $ visitorCollection ->addFieldToFilter ('last_visit_at ' , ['from ' => $ activeSessionsTime ]);
1641- $ visitorCollection ->addFieldToFilter ('session_id ' , ['neq ' => $ this ->sessionManager ->getSessionId ()]);
1642- /** @var \Magento\Customer\Model\Visitor $visitor */
1643- foreach ($ visitorCollection ->getItems () as $ visitor ) {
1644- $ sessionId = $ visitor ->getSessionId ();
1645- $ this ->saveHandler ->destroy ($ sessionId );
1646- }
1647- }
1648-
16491617 /**
16501618 * Set ignore_validation_flag for reset password flow to skip unnecessary address and customer validation
16511619 *
0 commit comments