                     let userItem = User(snapshot: user as! FIRDataSnapshot)
                     
                     if textField.text! == userItem.email {
-                        
-                        // TODO: Gevonden!
-                        // Stuur naar userItem naar iets
+                        // Buddy is found in user database.
                         print("Gevonden: \(userItem.email)")
                         completion(true, userItem)
                         return
                     }
                 }
-                
+                // Buddy is not a known Aventure Time user.
                 completion(false, nil)
             })
-            
-            
-            // users ophalen en checken op email
-            // als user bestaat; toevoegen
-            // anders foutmelding
-            
         })
         
         let cancelAction = UIAlertAction(title: "Cancel", style: .default, handler: {

    @IBAction func inviteButtonDidTouch(_ sender: UIButton) {
        
        showAlertControllerWith { (succeed, user) in
            
            if succeed {
                
                if let user = user {
                    
                    print("gelukt!! UID buddy: \(user.uid)")
                    // TODO!
                    
                    
                    self.travelRef.observe(.value, with: { snapshot in
                        for item in snapshot.children {
                            var travelItem = Travel(snapshot: item as! FIRDataSnapshot)
                            
                            if travelItem.travelId == self.travelId {
//                                travelItem.uids.append(user.uid)
                            }
                        }
                    })
                }
                
            } else {
                
                print("Er is iets fout gegaan!")
                // geef alert
            }
            
        }


        return cell
    }
    
    func presentAlert(title: String, message: String) -> Void {
        let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert)
        alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
        self.present(alert, animated: true, completion: nil)
    }


    override func didReceiveMemoryWarning() {
