我很困惑;如何从parse.com USER数据库中获取布尔值?
我想要达到的是:
if(The user who is trying to log in right now has not verified his email){
Toast.makeText(getApplicationContext(),"Verify your email please",Toast.LENGTH_SHORT).show();
}
因此,基本上,我的问题是:如何获得用户的布尔值?
最佳答案
如您所见,Parse中的“ _User”类具有一个布尔列“ emailVerified”。您根据需要读取“ emailVerified”的值。
ParseUser user = ParseUser.getCurrentUser();
Boolean isVerified = user.getBoolean("emailVerified");