Prestashop Admin Page Keep Getting Log Out

On recent development on Prestashop, I was getting the issue of keep getting log out at the admin page. It was like after few clicks after login, I was logout and request to login again.

After searching, here the solution on how to resolve it. From my experience, it only appears at my ISP Starhub. 😦

Code in classes/Cookie.php

if ($this->id_employee AND Validate::isUnsignedId($this->id_employee) AND Employee::checkPassword(intval($this->id_employee), $this->passwd) AND (!isset($this->_content['remote_addr']) OR $this->_content['remote_addr'] == ip2long(Tools::getRemoteAddr())))

Modify it to

 if ($this->id_employee AND Validate::isUnsignedId($this->id_employee) AND Employee::checkPassword(intval($this->id_employee), $this->passwd)) 

Source: vodien.com

Advertisements