public function AutologoutController::ajaxSetLast in Automated Logout 8
Ajax callback to reset the last access session variable.
1 string reference to 'AutologoutController::ajaxSetLast'
File
- src/
Controller/ AutologoutController.php, line 94
Class
- AutologoutController
- Returns responses for autologout module routes.
Namespace
Drupal\autologout\ControllerCode
public function ajaxSetLast() {
$_SESSION['autologout_last'] = $this->time
->getRequestTime();
// Reset the timer.
$response = new AjaxResponse();
$markup = $this->autoLogoutManager
->createTimer();
$response
->addCommand(new ReplaceCommand('#timer', $markup));
return $response;
}