Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2019-03-15 07:18:45 +0300
committerGitHub <noreply@github.com>2019-03-15 07:18:45 +0300
commitda7272436fdac34470987f60bba92aea21b9eabd (patch)
tree8007f0e5105d1e3d92aa50034ce8dbad7bd0ab30 /core/Tracker/VisitorRecognizer.php
parent8edc76eee3ceeb5da8d3ad8403c2c2bf9c5bf8e9 (diff)
Do not match by config ID if trust visitor cookies is used and a user ID is supplied. (#14196)
Diffstat (limited to 'core/Tracker/VisitorRecognizer.php')
-rw-r--r--core/Tracker/VisitorRecognizer.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/Tracker/VisitorRecognizer.php b/core/Tracker/VisitorRecognizer.php
index 7e6db6b9b9..249c31af5a 100644
--- a/core/Tracker/VisitorRecognizer.php
+++ b/core/Tracker/VisitorRecognizer.php
@@ -161,17 +161,17 @@ class VisitorRecognizer
{
$isForcedUserIdMustMatch = (false !== $request->getForcedUserId());
- if ($isForcedUserIdMustMatch) {
- // if &iud was set, we must try and match both idvisitor and config_id
- return false;
- }
-
// This setting would be enabled for Intranet websites, to ensure that visitors using all the same computer config, same IP
// are not counted as 1 visitor. In this case, we want to enforce and trust the visitor ID from the cookie.
- if ($isVisitorIdToLookup && $this->trustCookiesOnly) {
+ if (($isVisitorIdToLookup || $isForcedUserIdMustMatch) && $this->trustCookiesOnly) {
return true;
}
+ if ($isForcedUserIdMustMatch) {
+ // if &iud was set, we must try and match both idvisitor and config_id
+ return false;
+ }
+
// If a &cid= was set, we force to select this visitor (or create a new one)
$isForcedVisitorIdMustMatch = ($request->getForcedVisitorId() != null);