Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Magento Force Customer Login Without Password
// Retrieve Customer by Email (or other method)
$customer = Mage::getModel('customer/customer')
->setWebsiteId(Mage::app()->getStore()->getWebsiteId())
->loadByEmail($email);
// Set as Logged In and Clear Session
Mage::getSingleton('customer/session')->setCustomerAsLoggedIn($customer)
->renewSession();
// Redirect or do something here :)
@jbatalla

This comment has been minimized.

Copy link

jbatalla commented Sep 1, 2014

Hi brodkin,

Where do i put this code in case i want customer to login without pass?

Thanks,
Jason

@kishankanani

This comment has been minimized.

Copy link

kishankanani commented Aug 21, 2015

Hi brodkin,

Where do i put this code in case i want customer to login without pass?

Thanks,
Kishan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.