Fix other user email retrieval

The id argument needs to actually be used
This commit is contained in:
NMerz 2020-11-30 10:40:38 -05:00
parent 53570b3356
commit d8f722c4ac
2 changed files with 5 additions and 8 deletions

View File

@ -33,15 +33,12 @@ public class UserGetter implements CallHandler {
checkRequest.setFilter("email=\"" + emailObject.toString() +"\"");
} else {
try {
// String id = queryMap.get("id");
String id = queryMap.get("id");
attributeToGet = "email";
checkRequest.setFilter("sub=\"" + cognitoID + "\"");
// if ((id != null) && (!id.equals(""))) {
// attributeToGet = "email";
// checkRequest.setFilter("sub=\"" + cognitoID + "\"");
// } else {
// return cognitoID;
// }
if ((id != null) && (!id.equals(""))) {
checkRequest.setFilter("sub=\"" + id + "\"");
}
} catch (Exception e) {
System.out.println(e);
return new User(cognitoID, null);

View File

@ -69,7 +69,7 @@ public class AuthManager {
jsonException.printStackTrace();
}
SynchronousReceiver<User> userSynchronousReceiver = new SynchronousReceiver<>();
requestor.getObject("self", User.class, userSynchronousReceiver);
requestor.getObject("", User.class, userSynchronousReceiver);
try {
email = userSynchronousReceiver.await().getEmail();
} catch (Exception e) {