Jump to content

[Solved] Unable to login in FO


Recommended Posts

Hello everyone,

I was unable to login in the Front Office area and I didn't find any solution in the forum (or at least in a language I understand). So I decided to change the code a bit and it now works.

here was the problem:
When I attempt to login in the Front Office, I get "DNS Error" in IE8 and "The connection was reset" in FF. the URL was http://www.mydomain.com/authentication.php

After looking through the forum with no luck, I decided to look at the code and isolate the problem.

Solution:
Open authentication.php
Scroll down to where you see this code:

$cookie->id_customer = intval($customer->id);
           $cookie->customer_lastname = $customer->lastname;
           $cookie->customer_firstname = $customer->firstname;
           $cookie->logged = 1;
           $cookie->passwd = $customer->passwd;
           $cookie->email = $customer->email;
           if (Configuration::get('PS_CART_FOLLOWING') AND (empty($cookie->id_cart) OR Cart::getNbProducts($cookie->id_cart) == 0))
               $cookie->id_cart = intval(Cart::lastNoneOrderedCart(intval($customer->id)));
           $id_address = intval(Address::getFirstCustomerAddressId(intval($customer->id)));            
           $cookie->id_address_delivery = $id_address;
           $cookie->id_address_invoice = $id_address;
           Module::hookExec('authentication');
           if($back = Tools::getValue('back'))
               Tools::redirect($back);
           Tools::redirect('my-account.php');



replace that code with this code:

$cookie->id_customer = intval($customer->id);
           $cookie->customer_lastname = $customer->lastname;
           $cookie->customer_firstname = $customer->firstname;
           $cookie->logged = 1;
           $cookie->passwd = $customer->passwd;
           $cookie->email = $customer->email;
           if (Configuration::get('PS_CART_FOLLOWING') AND (empty($cookie->id_cart) OR Cart::getNbProducts($cookie->id_cart) == 0))
               $cookie->id_cart = intval(Cart::lastNoneOrderedCart(intval($customer->id)));

           if($cookie->id_cart != '')
               Tools::redirect('order.php?step=1');
           Tools::redirect('authentication.php?back=my-account.php');



After that login and checkout login should work.

What I would like to know is what does the code I removed does, because I don't see any difference so far

$id_address = intval(Address::getFirstCustomerAddressId(intval($customer->id)));            
           $cookie->id_address_delivery = $id_address;
           $cookie->id_address_invoice = $id_address;
           Module::hookExec('authentication');
           if($back = Tools::getValue('back'))
                 Tools::redirect($back);
           Tools::redirect('my-account.php');



Thank You

Link to comment
Share on other sites

  • 2 months later...

I just wanted to let you know that I too was having the exact same problem with IE8 and FF 3.5.8 where users had no problems creating an account... but once they logged out of their account, then logged back in, the authentication.php page was causing an error. I am soo glad that you have fixed this and it has also fixed the problem for my estore with logging into the estore.

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...