- Patch #35354 by Moshe/chx: only update the last access time for authenticated users.

4.7.x
Dries Buytaert 2005-10-28 13:35:49 +00:00
parent 699df6742b
commit d01b4dbe10
1 changed files with 3 additions and 2 deletions

View File

@ -43,8 +43,9 @@ function sess_write($key, $value) {
global $user;
db_query("UPDATE {sessions} SET uid = %d, cache = %d, hostname = '%s', session = '%s', timestamp = %d WHERE sid = '%s'", $user->uid, $user->cache, $_SERVER["REMOTE_ADDR"], $value, time(), $key);
db_query("UPDATE {users} SET access = %d WHERE uid = %d", time(), $user->uid);
if ($user->uid) {
db_query("UPDATE {users} SET access = %d WHERE uid = %d", time(), $user->uid);
}
return '';
}