Simone Salerno Posted June 23, 2015 Share Posted June 23, 2015 Prestashop has an annoying feature that logs you out from the back-office if you do nothing for a certain amount of time (for security reasons, I suppose). I thought this behaviour was configurable from the Preferences panel, with COOKIE LIFETIME BO. So I set it to 24 (1 day), but it still gave me problems. After investingating the code, I found that the amount of time is actually hardcoded in the source, in the file root/classes/controller/AdminController.php and set to 900 seconds (15 mins). Here’s the code: if ($this->context->cookie->last_activity + 900 < time()) $this->context->employee->logout(); All I needed to do was change that to something higher (say 4*3600 = 4 hours) and I still have security, without the pains. Here's a link to a blog post I wrote about this. 2 Link to comment Share on other sites More sharing options...
bellini13 Posted June 24, 2015 Share Posted June 24, 2015 you should submit this as a defect using their forge, this way they can fix their code and include in a future release Link to comment Share on other sites More sharing options...
Simone Salerno Posted June 26, 2015 Author Share Posted June 26, 2015 @bellini13 Thanks for the suggestion. I did it. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now