         imagePicker.allowsEditing = false
         present(imagePicker, animated: true, completion: nil)
         
+    }
+    
+    func displayAlertMessage(userMessage:String)
+    {
+        let myAlert = UIAlertController(title:"Alert", message: userMessage, preferredStyle: UIAlertControllerStyle.alert);
+        
+        let okAction = UIAlertAction(title:"OK", style: UIAlertActionStyle.default, handler:nil);
+        
+        myAlert.addAction(okAction);
+        self.present(myAlert, animated:true, completion:nil);
     }
     
     

                    
                    //no there is no user with desired email
                    print("\(userEmail) isn't a user")
                }) { (error) in
                    print("Failed to get snapshot", error.localizedDescription)


                         print("key = \(uid)")
                        Database.database().reference().child("users").child(uid).child("messages").childByAutoId().setValue(message)
                        
                        
                        
                    }
                    
                    
