Skip to main content
add new tags
Link
Rohan Hapani
  • 17.5k
  • 9
  • 55
  • 96

How to login a user with an E-mail to magento2 site without triggering event 'customer_login'customer_login. Actually

Actually, I am able to login with email using customer session but the customer session also triggers the 'customer_login'customer_login events. 

I don't want to use a trigger.

$customer = $this->_customer->loadByEmail("[email protected]");  

$this->_customerSession->setCustomerAsLoggedIn($customer);

How to login a user with an E-mail to magento2 site without triggering event 'customer_login'. Actually, I am able to login with email using customer session but the customer session also triggers the 'customer_login' events. I don't want to use a trigger.

$customer = $this->_customer->loadByEmail("[email protected]"); 
$this->_customerSession->setCustomerAsLoggedIn($customer);

How to login a user with an E-mail to magento2 site without triggering event customer_login.

Actually, I am able to login with email using customer session but the customer session also triggers the customer_login events. 

I don't want to use a trigger.

$customer = $this->_customer->loadByEmail("[email protected]");  

$this->_customerSession->setCustomerAsLoggedIn($customer);
Source Link
Arshad Syed
  • 573
  • 5
  • 14

Customer Login to Magento2 without triggering event 'customer_login'

How to login a user with an E-mail to magento2 site without triggering event 'customer_login'. Actually, I am able to login with email using customer session but the customer session also triggers the 'customer_login' events. I don't want to use a trigger.

$customer = $this->_customer->loadByEmail("[email protected]"); 
$this->_customerSession->setCustomerAsLoggedIn($customer);