From 6b4fb98a02cd1baf57f46a1fe6912d9b782231dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 6 Jan 2016 17:26:27 +0100 Subject: [PATCH] Force a guest user in BackgroundQueueHandler::performJob() --- .../lib/system/background/BackgroundQueueHandler.class.php | 7 +++++++ 1 file changed, 7 insertions(+) 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); + } } /** -- 2.20.1