private JSONObject getUserJson(String uid) throws JSONException {
JSONObject obj = new JSONObject();
obj.put(UserConstants.KEY_LOGIN, uid);
try {
UserInfo userInfo = OrionConfiguration.getMetaStore().readUserByProperty(UserConstants2.USER_NAME, uid, false, false);
if (userInfo == null) {
return null;
}
obj.put(UserConstants.KEY_UID, uid);
obj.put(UserConstants.KEY_LOGIN, userInfo.getUserName());
obj.put(UserConstants.KEY_LOCATION, '/' + UserConstants.KEY_USERS + '/' + uid);
obj.put(UserConstants2.FULL_NAME, userInfo.getFullName());
if (userInfo.getProperties().containsKey(UserConstants2.LAST_LOGIN_TIMESTAMP)) {
Long lastLogin = Long.parseLong(userInfo.getProperty(UserConstants2.LAST_LOGIN_TIMESTAMP));
obj.put(UserConstants2.LAST_LOGIN_TIMESTAMP, lastLogin);
}
if (userInfo.getProperties().containsKey(UserConstants2.DISK_USAGE_TIMESTAMP)) {
Long lastLogin = Long.parseLong(userInfo.getProperty(UserConstants2.DISK_USAGE_TIMESTAMP));
obj.put(UserConstants2.DISK_USAGE_TIMESTAMP, lastLogin);
}
if (userInfo.getProperties().containsKey(UserConstants2.DISK_USAGE)) {
Long lastLogin = Long.parseLong(userInfo.getProperty(UserConstants2.DISK_USAGE));
obj.put(UserConstants2.DISK_USAGE, lastLogin);
}
} catch (IllegalArgumentException e) {
LogHelper.log(e);
} catch (CoreException e) {