Reputation: 87
Hi (I'm new so you'll have to forgive me)
I'm trying to retrieve a boolean value from the column "isSignedIn" from the current User in the User class in parse server.
The issue I have is that every time I try to retrieve it, the Boolean value always returns as false even though I have manually set it to true in the parse front end:
This is the code I am using to retrieve the value:
public boolean isSignedIn(){
ParseUser user = ParseUser.getCurrentUser();
Boolean signedInStatus = Boolean.valueOf(user.getBoolean("isSignedIn"));
Log.i("isSignedIn", signedInStatus.toString());
return signedInStatus;
}
I thought that a parse query may work but I'm not sure if it would be as efficient as if I fixed the code above.
Any ideas on what I can do to fix this?
Upvotes: 0
Views: 294
Reputation: 1769
You probably need to call fetch()
on your user before getting the value so you have the latest up to date value from the server!
Upvotes: 1