Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
Merge pull request #290 from nuwandi-is/b513
Browse files Browse the repository at this point in the history
fix for IDENTITY-3246
  • Loading branch information
johannnallathamby committed May 15, 2015
2 parents 3c4dc54 + eaf63fb commit 36cf705
Showing 1 changed file with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,29 +123,30 @@ public UserIdentityClaimsDO load(String userName, UserStoreManager userStoreMana
userDataMap.put(claimUri, claim.getValue());
}
}
} else {
// null is returned when the user doesn't exist
return null;
}
} catch (UserStoreException e) {
// ignore may be user is not exist
log.error("Error while reading user claim values");
return null;
} finally {
// reset to initial value
if (log.isDebugEnabled()) {
log.debug("Reset flag to indicate method UserStoreBasedIdentityDataStore.load() being completing");
}
userStoreInvoked.set("FALSE");
}
// if user is exiting there must be at least one user attribute.
if (userDataMap != null && userDataMap.size() > 0) {
userIdentityDTO = new UserIdentityClaimsDO(userName, userDataMap);
int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId();
userIdentityDTO.setTenantId(tenantId);

Cache<String, UserIdentityClaimsDO> cache = getCache();
if (cache != null) {
cache.put(tenantId + userName, userIdentityDTO);
}
return userIdentityDTO;
userIdentityDTO = new UserIdentityClaimsDO(userName, userDataMap);
int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId();
userIdentityDTO.setTenantId(tenantId);

Cache<String, UserIdentityClaimsDO> cache = getCache();
if (cache != null) {
cache.put(tenantId + userName, userIdentityDTO);
}
return null;
return userIdentityDTO;
}

}

0 comments on commit 36cf705

Please sign in to comment.