I am coding an app and have user upon the user logging in I would like to take them to their dashboard and display info regarding their account. I am trying to display the username in a label but am having issues retrieving it. I am using the following code:
func getData(){
    var query: PFQuery = PFQuery(className: "User")
    query.whereKey("username", equalTo: "actualUsername")
    query.getFirstObjectInBackgroundWithBlock{
        (object: PFObject!, error: NSError!) - >Void; in
        if object != nil {
        NSLog("Success!")
        } else {
            NSLog("something went wrong")
        }
    }
I am using swift and xcode7
 
     
     
    