Fixing a small css issue in the user class.
[elgg.git] / units / users / function_session_start.php
blobceba07c10f42ef9b6b5dea3ece0792bffde60549
1 <?php
2 global $USER;
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
12 if (logged_on) {
13 $newtime = time();
14 if ($USER->last_action < ($newtime - 5)) {
15 // Update the 'last action' time counter to now for the current user
16 $user = new StdClass;
17 $user->last_action = $newtime;
18 $USER->last_action = $newtime;
19 $user->ident = $USER->ident;
20 update_record('users',$user);