3 // Check to see if authorization is needed (check cookie)
4 $logged_in = isloggedin();
6 //TODO should probably go but maybe we should keep it
7 // for backwards compatibility
8 // Set logged-in status in stone
9 define('logged_on', $logged_in);
11 // If we're not logged in, set the user ID to -1
14 if ($USER->last_action
< ($newtime - 5)) {
15 // Update the 'last action' time counter to now for the current user
17 $user->last_action
= $newtime;
18 $USER->last_action
= $newtime;
19 $user->ident
= $USER->ident
;
20 update_record('users',$user);