function autologout_nodeapi in Automated Logout 6
Same name and namespace in other branches
- 5 autologout.module \autologout_nodeapi()
- 6.2 autologout.module \autologout_nodeapi()
Implementation of hook_nodeapi().
File
- ./autologout.module, line 295 
- 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;
  }
}