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:
authormattab <matthieu.aubry@gmail.com>2014-09-08 07:30:56 +0400
committermattab <matthieu.aubry@gmail.com>2014-09-08 07:30:56 +0400
commite2b61f5dd767b1606f99826ba060fccbe1ba674c (patch)
tree339a647c4bd49bbdbf41618ad828f4e555fbd34e /core/Common.php
parent8a0a7d80571d57bcef947e6006eb4be97ba02150 (diff)
Refs #3490 Adding segment 'userId==' + some '&segment=userId==' integration tests + doc blocks
Diffstat (limited to 'core/Common.php')
-rw-r--r--core/Common.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/Common.php b/core/Common.php
index ecfefabcec..5d5c35c764 100644
--- a/core/Common.php
+++ b/core/Common.php
@@ -575,6 +575,18 @@ class Common
}
/**
+ * Converts a User ID string to the Visitor ID Binary representation.
+ *
+ * @param $userId
+ * @return string
+ */
+ public static function convertUserIdToVisitorIdBin($userId)
+ {
+ $userIdHashed = \PiwikTracker::getUserIdHashed($userId);
+ return self::convertVisitorIdToBin($userIdHashed);
+ }
+
+ /**
* Convert IP address (in network address format) to presentation format.
* This is a backward compatibility function for code that only expects
* IPv4 addresses (i.e., doesn't support IPv6).