Fix admin login to tracker

merge-requests/899/head
Rushdi Mohamed 3 years ago
parent a521985e98
commit 35a5230ef7

@ -476,6 +476,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
JSONObject obj = new JSONObject(DeviceAPIClientServiceImpl.returnUser(currentUser));
log.info("=================");
log.info(currentUser);
log.info(obj.toString());
log.info("==================");
if(obj.has("error")){

@ -176,7 +176,9 @@ public class TraccarClientImpl implements TraccarClient {
traccarUser.setId(obj.getInt("id"));
traccarUser.setName(obj.getString("name"));
traccarUser.setLogin(obj.getString("login"));
if(!obj.isNull("login")){
traccarUser.setLogin(obj.getString("login"));
}
traccarUser.setEmail(obj.getString("email"));
traccarUser.setDeviceLimit(obj.getInt("deviceLimit"));
traccarUser.setUserLimit(obj.getInt("userLimit"));

Loading…
Cancel
Save