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() +"\""); checkRequest.setFilter("email=\"" + emailObject.toString() +"\"");
} else { } else {
try { try {
// String id = queryMap.get("id"); String id = queryMap.get("id");
attributeToGet = "email"; attributeToGet = "email";
checkRequest.setFilter("sub=\"" + cognitoID + "\""); checkRequest.setFilter("sub=\"" + cognitoID + "\"");
// if ((id != null) && (!id.equals(""))) { if ((id != null) && (!id.equals(""))) {
// attributeToGet = "email"; checkRequest.setFilter("sub=\"" + id + "\"");
// checkRequest.setFilter("sub=\"" + cognitoID + "\""); }
// } else {
// return cognitoID;
// }
} catch (Exception e) { } catch (Exception e) {
System.out.println(e); System.out.println(e);
return new User(cognitoID, null); return new User(cognitoID, null);

View File

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