PrestaShop Forums: [Solved] Unable to login in FO - PrestaShop Forums

Jump to content


Welcome to the PrestaShop Forum! We hope you'll share your comments and suggestions with us. We ask that you please post in English to the main sections of the PrestaShop Forum. If you want to write in another language, please post in the corresponding PrestaShop Community section below.

Please note that PrestaShop Community sections are largely self-moderated. PrestaShop team members may or may not participate in non-English sections. To improve the chances of receiving feedback to your question or comment, please post it in English to the main sections of our Forum.

NYC

Vous parlez français ? par ici !


[Solved] Unable to login in FO


[Solved] Unable to login in FO

#1 Guest_moises2002_*

  • --
  • Guests

Posted 20 December 2009 - 05:50 PM

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....hentication.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

#2 Guest__*

  • --
  • Guests

Posted 19 March 2010 - 11:16 PM

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.

#3 Guest_Arafat Jahan_*

  • --
  • Guests

Posted 19 August 2011 - 08:44 PM

Check your Back Office>Preferences>SEO & URLs and make sure all your languages have define url-rewrite , as if any url-rewrite was not define than it will not work in friendly-URL mode.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users