Fix Logging In on Old Magento 1 Installs

On certain Magento instance installs, a valid customer login will seem to fail and redirect to the login page. We’ve seen this on plenty of Magento 1.6s thus far, however newer versions may also be affected.

The problem lies in the login method of the Mage_Customer_Model_Session class. The fix, in this instance is to remove the renewSession call within that method:

 public function login($username, $password)
{
    /** @var $customer Mage_Customer_Model_Customer */
    $customer = Mage::getModel('customer/customer')
        ->setWebsiteId(Mage::app()->getStore()->getWebsiteId());

    if ($customer->authenticate($username, $password)) {
        $this->setCustomerAsLoggedIn($customer);
        // This breaks certain setups
        //$this->renewSession();
        return true;
    }
    return false;
}

This has been rolled into a module here: https://github.com/llapgoch/fix-old-magento-login