[*] BO: Add an option to autologout to the backoffice after 15 minutes
This commit is contained in:
1 parent
6c35b20b02
commit
278dc32482
4 files changed
+16
-7
No files matched your search
@@ -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