You are here

function autologout_nodeapi in Automated Logout 6.2

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

Implementation of hook_nodeapi().

File

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

Code

function autologout_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
  _autologout_debug("autologout_nodeapi({$op})");

  // if a user is entering data then don't log them out or
  // they will loose their work. There's nothing more
  // frustrating than entering alot of info only for a
  // website to throw it away!
  switch ($op) {
    case "insert":
    case "update":
    case "execute":
    case "validate":
    case "prepare":
    case "delete":
      $_SESSION['lastaccess'] = time();
      break;
  }
}