Skip to content

Commit

Permalink
fix empty user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
mutec committed Feb 10, 2020
1 parent ff7f7e3 commit cf5bfb2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ public function execute($eventObj, $className, $eventName, array &$parameters) {
/** @var AbstractPage $eventObj */

if (!WCF::getUser()->userID && !WCF::getSession()->spiderID && USERS_ONLINE_SEND_UNKNOWN_USERAGENTS) {
$profile = new UserOnline(WCF::getUser());
$userAgent = UserUtil::getUserAgent();
$profile = new UserOnline(WCF::getUser());
$profile->userAgent = $userAgent;

if ($userAgent == $profile->getBrowser() && !preg_match('/(WoltLab (Suite|Community Framework)|WSC-Connect|shoWWelle)/', $userAgent)) {
BackgroundQueueHandler::getInstance()->enqueueIn([
Expand Down

0 comments on commit cf5bfb2

Please sign in to comment.