Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #3490 Adding segment 'userId==' + some '&segment=userId==' integ…
…ration tests + doc blocks
- Loading branch information
Showing
13 changed files
with
244 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,6 +151,20 @@ public function getSegmentsMetadata($idSites = array(), $_hideImplementationData | |
|
||
$isAuthenticatedWithViewAccess = Piwik::isUserHasViewAccess($idSites) && !Piwik::isUserIsAnonymous(); | ||
|
||
$segments[] = array( | ||
'type' => 'dimension', | ||
'category' => Piwik::translate('General_Visit'), | ||
'name' => 'General_UserId', | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mattab
Author
Member
|
||
'segment' => 'userId', | ||
'acceptedValues' => 'any non empty unique string identifying the user (such as an email address or a username).', | ||
'sqlSegment' => 'log_visit.idvisitor', | ||
'sqlFilterValue' => array('Piwik\Common', 'convertUserIdToVisitorIdBin'), | ||
'permission' => $isAuthenticatedWithViewAccess, | ||
|
||
// TODO specify that this segment is not compatible with some operators | ||
// 'unsupportedOperators' = array(MATCH_CONTAINS, MATCH_DOES_NOT_CONTAIN), | ||
); | ||
|
||
$segments[] = array( | ||
'type' => 'dimension', | ||
'category' => Piwik::translate('General_Visit'), | ||
|
@@ -161,6 +175,7 @@ public function getSegmentsMetadata($idSites = array(), $_hideImplementationData | |
'sqlFilterValue' => array('Piwik\Common', 'convertVisitorIdToBin'), | ||
'permission' => $isAuthenticatedWithViewAccess, | ||
); | ||
|
||
$segments[] = array( | ||
'type' => 'dimension', | ||
'category' => Piwik::translate('General_Visit'), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Just wondering if it maybe should be log_visit.userId? Was just wondering as the method in sqlFilterValue says convertUserIdTo... so I was assuming it gets a userId and not idvisitor. But I didn't have a deeper look so if not just ignore it