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
path: root/js
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2015-03-10 08:54:29 +0300
committermattab <matthieu.aubry@gmail.com>2015-03-10 08:54:29 +0300
commit12363f9ca7e17ba3b0b24d8fd214e1685939856d (patch)
tree1e21f570ee07e7c9d7fff51b78e2852f110fa219 /js
parent5271d7d287609da06eedafa66dac1047c1fa5ff5 (diff)
Fixes #7368 - Do not set user id when it's set to empty string or it would set the same visitor id to all those visitors
Diffstat (limited to 'js')
-rw-r--r--js/piwik.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/piwik.js b/js/piwik.js
index 27413028ff..0f4f5d253a 100644
--- a/js/piwik.js
+++ b/js/piwik.js
@@ -4245,6 +4245,9 @@ if (typeof Piwik !== 'object') {
* @param string User ID
*/
setUserId: function (userId) {
+ if(!isDefined(userId) || !userId.length) {
+ return;
+ }
configUserId = userId;
visitorUUID = hash(configUserId).substr(0, 16);
},