在解析后将电子邮件发送到输入的电子邮件地址后,我如何检查swift中是否已验证该电子邮件地址,然后才允许用户登录该应用程序?谢谢!
答案 0 :(得分:0)
解析User
对象,具有字段emailVerified
。因此,当用户登录应用程序时,您可以检查它:
PFUser.logInWithUsernameInBackground(email, password: password) { (user, error) in
if error == nil{
if let verified = user["emailVerified"] as? Bool{
if verified == true{
// log in
}else{
// show that email isn't verified
}
}else{
// show that email isn't verified
}
}
}