[*] BO: Add an option to autologout to the backoffice after 15 minutes
This commit is contained in:
@@ -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()))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user