I am trying to get user information (email address) from Parse. I have tried the following code, but it displays an error, saying that "Anyobject is not convertible to String". What am I supposed to do to get the email address? Thanks in advance.
//Retrieve user info from parse
var query:PFQuery=PFQuery(className: "_User");
query.whereKey("objectId", equalTo: PFUser.currentUser()!.objectId!)
query.findObjectsInBackgroundWithBlock{
(posts: [AnyObject]?, error: NSError?) -> Void in
if !(error != nil) {
let user = PFUser.currentUser()
var email = user["email"] as! String
}
}