mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-16 10:48:46 +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() +"\"");
|
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);
|
||||||
|
|||||||
@ -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) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user