You are here

function autologout_boot in Automated Logout 7.2

Same name and namespace in other branches
  1. 6 autologout.module \autologout_boot()
  2. 6.2 autologout.module \autologout_boot()

Implements hook_boot(). NOTE: Do as little as possible here. A lot of modules are not loaded at this point.

File

./autologout.module, line 160
Used to automagically log out a user after a preset time, AjK May 2006

Code

function autologout_boot() {
  global $user;
  if ($user->uid < 1) {
    return;
  }
  if (!isset($_SESSION['autologout_hits'])) {
    $_SESSION['autologout_hits'] = array();
  }
  $_SESSION['autologout_hits'][] = REQUEST_TIME;
}