From 0ffec515649cb0913900cdb06226c039cb8597e3 Mon Sep 17 00:00:00 2001 From: Sajith Ekanayaka Date: Sat, 4 Aug 2018 12:45:29 +0530 Subject: [PATCH] Use profileName instead "default" or null --- .../mgt/custom/extension/MyUserMgtCustomExtension.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/soasecurity/user/mgt/custom/extension/MyUserMgtCustomExtension.java b/src/main/java/org/soasecurity/user/mgt/custom/extension/MyUserMgtCustomExtension.java index 46ca53bd2..d831e7fe7 100644 --- a/src/main/java/org/soasecurity/user/mgt/custom/extension/MyUserMgtCustomExtension.java +++ b/src/main/java/org/soasecurity/user/mgt/custom/extension/MyUserMgtCustomExtension.java @@ -69,12 +69,12 @@ public boolean doPostSetUserClaimValues(String userName, Map cla log.info("Username: " + userName); log.info("Profile: " + profileName); - log.info("NAME: " + userStoreManager.getUserClaimValue(userName, "http://wso2.org/claims/fullname", "default")); - log.info("EMAIL: " + userStoreManager.getUserClaimValue(userName, "http://wso2.org/claims/emailaddress", "default")); + log.info("NAME: " + userStoreManager.getUserClaimValue(userName, "http://wso2.org/claims/fullname", profileName)); + log.info("EMAIL: " + userStoreManager.getUserClaimValue(userName, "http://wso2.org/claims/emailaddress", profileName)); // This doens't work for identity claims -// log.info("LOCKED: " + userStoreManager.getUserClaimValue(userName, "http://wso2.org/claims/identity/accountLocked", "default")); +// log.info("LOCKED: " + userStoreManager.getUserClaimValue(userName, "http://wso2.org/claims/identity/accountLocked", profileName)); // Following is the workaround for above problem @@ -83,7 +83,7 @@ public boolean doPostSetUserClaimValues(String userName, Map cla "http://wso2.org/claims/identity/emailVerified" }; - Map claimValues = userStoreManager.getUserClaimValues(userName, claimNames, null); + Map claimValues = userStoreManager.getUserClaimValues(userName, claimNames, profileName); log.info("LOCKED: " + claimValues.get(claimNames[0])); log.info("EmailVerified: " + claimValues.get(claimNames[1]));