diff --git a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/analytics/SynapseAnalyticsDataProvider.java b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/analytics/SynapseAnalyticsDataProvider.java index 822d681a0cc3..7dea8bfca460 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/analytics/SynapseAnalyticsDataProvider.java +++ b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/analytics/SynapseAnalyticsDataProvider.java @@ -311,6 +311,9 @@ public String getUserName() { if (messageContext.getPropertyKeySet().contains(APIMgtGatewayConstants.END_USER_NAME)) { return (String) messageContext.getProperty(APIMgtGatewayConstants.END_USER_NAME); } + else if (messageContext.getPropertyKeySet().contains(APIMgtGatewayConstants.USER_ID)) { + return (String) messageContext.getProperty(APIMgtGatewayConstants.USER_ID); + } return null; }