André G. Andrade
André G. Andrade

Reputation: 501

Customer authenticates only when the account is created in magento

When the user types his email and password at login page or checkout page he is redirected to login page always without any error message in screen and log files (php log and magento log). The dashboard is only acessible when the user creates a new account.

Magento 1.8.1 (migrated from 1.8.0) Ultimo theme

Upvotes: 0

Views: 252

Answers (2)

Pradeep Sanku
Pradeep Sanku

Reputation: 964

Please try this. Step 1: Web_Customer.xml - Enabling custom module:

<?xml version=”1.0″?>
<config>
<modules>
<Web_Customer>
<active>true</active>
<codePool>local</codePool>
</Web_Customer>
</modules>
</config>

Step 2: config.xml – Configuration for our module:

<?xml version=”1.0″?>
<config>
<modules>
<Web_Customer>
<version>0.0.1</version>
</Web_Customer>
</modules>
<frontend>
<routers>
<customer><!– Name of core module to be overridden–>
<args>
<modules>
<Web_Customer before=”Mage_Customer”>Web_Customer</Web_Customer><!– Tell Magento to call our custom module before the Mage/Checkout module –>
</modules>
</args>
</customer>
</routers>
</frontend>
</config>

Step 3: Add the following code to line 139 just after the opening of loginPostAction() in AccountController.php

<?php
require_once(“Mage/Customer/controllers/AccountController.php”);
class Web_Customer_AccountController extends Mage_CUstomer_AccountController{
public function loginPostAction()
{
// generate form_key if missing or invalid
if (!($formKey = $this->getRequest()->getParam(‘form_key’, null)) || $formKey != Mage::getSingleton(‘core/session’)->getFormKey()) {
$this->getRequest()->setParams(array(‘form_key’ =>Mage::getSingleton(‘core/session’)->getFormKey()));
}

//Note*
// rest code is same as from Mage/Customer/controllers/AccountController.php
}
}
?>

Upvotes: 1

sebi
sebi

Reputation: 413

Delete the folder var/cache and var/session. If the domain name has changed make sure that you also change the cookie domain in the database.

Upvotes: 0

Related Questions