[*] BO: Add an option to autologout to the backoffice after 15 minutes

This commit is contained in:
Rémi Gaillard
2013-10-10 12:20:10 +02:00
parent 6c35b20b02
commit 278dc32482
4 changed files with 16 additions and 7 deletions
+8
View File
@@ -1998,6 +1998,14 @@ class AdminControllerCore extends Controller
if (isset($_GET['logout']))
$this->context->employee->logout();
if (isset(Context::getContext()->cookie->last_activity))
{
if ($this->context->cookie->last_activity + 900 < time())
$this->context->employee->logout();
else
$this->context->cookie->last_activity = time();
}
if ($this->controller_name != 'AdminLogin' && (!isset($this->context->employee) || !$this->context->employee->isLoggedBack()))
{