From 3075b204e4dd114a017ae5b08e4fb14b254135a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 19 Feb 2019 16:32:00 +0100 Subject: [PATCH] Delete firstVisit = true, userID = 0 sessions after processing background queue MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit These sessions most likely stem from a script / cronjob that is set-up to regularly request the background queue to ensure it does not fill up in periods of low user activity. They “fill up” the session table, skew the user online statistics and are not going to be re-used. --- .../files/lib/action/BackgroundQueuePerformAction.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wcfsetup/install/files/lib/action/BackgroundQueuePerformAction.class.php b/wcfsetup/install/files/lib/action/BackgroundQueuePerformAction.class.php index 5aeb04157e..f5f05c9db9 100644 --- a/wcfsetup/install/files/lib/action/BackgroundQueuePerformAction.class.php +++ b/wcfsetup/install/files/lib/action/BackgroundQueuePerformAction.class.php @@ -1,6 +1,7 @@ getRunnableCount(); + if (WCF::getSession()->isFirstVisit() && !WCF::getUser()->userID) { + WCF::getSession()->delete(); + } exit; } } -- 2.20.1