From: Tim Düsterhus Date: Tue, 19 Feb 2019 15:32:00 +0000 (+0100) Subject: Delete firstVisit = true, userID = 0 sessions after processing background queue X-Git-Tag: 5.2.0_Alpha_1~176^2~8^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3075b204e4dd114a017ae5b08e4fb14b254135a0;p=GitHub%2FWoltLab%2FWCF.git Delete firstVisit = true, userID = 0 sessions after processing background queue 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. --- 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; } }