From: Tim Düsterhus Date: Wed, 6 Jan 2016 16:26:27 +0000 (+0100) Subject: Force a guest user in BackgroundQueueHandler::performJob() X-Git-Tag: 3.0.0_Beta_1~2066 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6b4fb98a02cd1baf57f46a1fe6912d9b782231dd;p=GitHub%2FWoltLab%2FWCF.git Force a guest user in BackgroundQueueHandler::performJob() --- diff --git a/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php b/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php index ff22fe0ea7..dedd7dd656 100644 --- a/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php +++ b/wcfsetup/install/files/lib/system/background/BackgroundQueueHandler.class.php @@ -1,5 +1,6 @@ changeUser(new User(null), true); $job->perform(); } catch (\Exception $e) { @@ -100,6 +104,9 @@ class BackgroundQueueHandler extends SingletonFactory { if ($e instanceof LoggedException) $e->getExceptionID(); } } + finally { + SessionHandler::getInstance()->changeUser($user, true); + } } /**