mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-15 18:28:47 +00:00
Fix other user email retrieval
The id argument needs to actually be used
This commit is contained in:
parent
53570b3356
commit
d8f722c4ac
@ -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);
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user