function autologout_ahah_set_last in Automated Logout 7.4
Same name and namespace in other branches
- 6.4 autologout.module \autologout_ahah_set_last()
Ajax callback to reset the last access session variable.
5 string references to 'autologout_ahah_set_last'
- AutologoutAjaxTestCase::testStayloggedInByAjax in tests/
autologout.test - Test ajax stay logged in callbacks work as expected.
- autologout_autologout_prevent in ./
autologout.module - Implements hook_autologout_prevent().
- autologout_create_block_form in ./
autologout.module - Drupal reset timer form on timer block.
- autologout_menu in ./
autologout.module - Implements hook_menu().
- hook_autologout_prevent in ./
autologout.api.php - Prevent autologout logging a user out.
File
- ./
autologout.module, line 541 - Used to automagically log out a user after a preset time.
Code
function autologout_ahah_set_last() {
$_SESSION['autologout_last'] = time();
// Let others act.
global $user;
module_invoke_all('auto_logout_session_reset', $user);
// Reset the timer.
$markup = autologout_create_timer();
$commands = array();
$commands[] = ajax_command_replace('#timer', $markup);
return array(
'#type' => 'ajax',
'#commands' => $commands,
);
}