Fixed bug on retriving email and fullname
This commit is contained in:
parent
f00306cbb6
commit
9e3bdeff3b
|
@ -138,15 +138,15 @@ public abstract class HelperMethods {
|
|||
public static String getUserEmail(String context, String token) throws Exception{
|
||||
|
||||
// check in cache
|
||||
String result = null;
|
||||
if((result = (String) userEmailCache.get(token)) != null){
|
||||
return result;
|
||||
String email = null;
|
||||
if((email = (String) userEmailCache.get(token)) != null){
|
||||
return email;
|
||||
}else{
|
||||
UserClient userClient = new UserClient();
|
||||
String email = userClient.getEmail();
|
||||
email = userClient.getEmail();
|
||||
userEmailCache.insert(token, email);
|
||||
}
|
||||
return result;
|
||||
return email;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -159,15 +159,15 @@ public abstract class HelperMethods {
|
|||
public static String getUserFullname(String context, String token) throws Exception{
|
||||
|
||||
// check in cache
|
||||
String result = null;
|
||||
if((result = (String) userFullnameCache.get(token)) != null){
|
||||
return result;
|
||||
String fullName = null;
|
||||
if((fullName = (String) userFullnameCache.get(token)) != null){
|
||||
return fullName;
|
||||
}else{
|
||||
UserClient userClient = new UserClient();
|
||||
String fuulName = userClient.getFullName();
|
||||
userFullnameCache.insert(token, fuulName);
|
||||
fullName = userClient.getFullName();
|
||||
userFullnameCache.insert(token, fullName);
|
||||
}
|
||||
return result;
|
||||
return fullName;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue