You are here

function autologout_ahah_logout in Automated Logout 7.4

Same name and namespace in other branches
  1. 6.4 autologout.module \autologout_ahah_logout()

AJAX callback that performs the actual logout and redirects the user.

5 string references to 'autologout_ahah_logout'
AutologoutAjaxTestCase::testAutologoutByAjax in tests/autologout.test
Test ajax logout callbacks work as expected.
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_menu in ./autologout.module
Implements hook_menu().
hook_autologout_prevent in ./autologout.api.php
Prevent autologout logging a user out.

File

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

Code

function autologout_ahah_logout($type = 'ajax') {
  _autologout_logout();
  if ($type !== 'ajax') {
    $redirect_url = variable_get('autologout_redirect_url', 'user/login');
    drupal_goto($redirect_url);
  }
  drupal_exit();
}