You are here

function autologout_ahah_get_remaining_time in Automated Logout 6.4

Same name and namespace in other branches
  1. 7.4 autologout.module \autologout_ahah_get_remaining_time()

AJAX callback that returns the time remaining for this user is logged out.

1 string reference to 'autologout_ahah_get_remaining_time'
autologout_menu in ./autologout.module
Implements hook_menu().

File

./autologout.module, line 534
Used to automagically log out a user after a preset time.

Code

function autologout_ahah_get_remaining_time() {
  $time_remaining_ms = _autologout_get_remaining_time() * 1000;

  // Reset the timer.
  $markup = autologout_create_timer();
  return drupal_json(array(
    'status' => TRUE,
    'data' => $markup,
    'time' => $time_remaining_ms,
  ));
}