From a521985e98857bf02b2dd1f64e49147e453b4005 Mon Sep 17 00:00:00 2001 From: Rushdi Date: Tue, 17 May 2022 21:53:00 +0530 Subject: [PATCH] Update tracker get token api --- .../mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java index c57f0463da..572cdcf884 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java @@ -472,11 +472,10 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { public Response getTraccarUserToken() { if (HttpReportingUtil.isTrackerEnabled()) { - String loggedUserName = CarbonContext.getThreadLocalCarbonContext().getUsername(); - JSONObject obj = new JSONObject(DeviceAPIClientServiceImpl.returnUser(loggedUserName)); + String currentUser = CarbonContext.getThreadLocalCarbonContext().getUsername(); + JSONObject obj = new JSONObject(DeviceAPIClientServiceImpl.returnUser(currentUser)); log.info("================="); - log.info(loggedUserName); log.info(obj.toString()); log.info("=================="); if(obj.has("error")){