Commit d01b4dbe authored by Dries's avatar Dries

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

parent 699df674
......@@ -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 '';
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment