<?php
namespace wcf\system\background;
+use wcf\data\user\User;
use wcf\system\background\job\AbstractBackgroundJob;
use wcf\system\exception\LoggedException;
use wcf\system\exception\SystemException;
* @param \wcf\system\background\job\AbstractBackgroundJob $job The job to perform.
*/
public function performJob(AbstractBackgroundJob $job) {
+ $user = WCF::getUser();
+
try {
+ SessionHandler::getInstance()->changeUser(new User(null), true);
$job->perform();
}
catch (\Exception $e) {
if ($e instanceof LoggedException) $e->getExceptionID();
}
}
+ finally {
+ SessionHandler::getInstance()->changeUser($user, true);
+ }
}
/**