title: How to save data in current uid in Firebase
body: <p>I can't save new data ("messages") to current user. </p>
  
  <p>my code for push user info to Firebase</p>
  
  <pre><code>var ref: FIRDatabaseReference! = FIRDatabase.database().reference()
  
  self.ref.child("Users").child("UserID").childByAutoId().setValue(["Name": userName, "Email": userEmail])
  </code></pre>
  
  <p>code for push messages to Firebase</p>
  
  <pre><code>var messageRef: FIRDatabaseReference = FIRDatabase.database().reference()
  let uid = FIRAuth.auth()?.currentUser?.uid
  messageRef.child("Users").child("UserID").child(self.uid!).child("Messages").childByAutoId().setValue(["Sender Name": Profile.sharedProfile.Name!,"Date": self.currentDate(),"Time": self.currentTime(), "Text": self.text.text!])
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Gx46V.png" rel="nofollow noreferrer">It's what i see in Firebase Database</a></p>
  
  <p>but i want's like this <a href="https://i.stack.imgur.com/9W5Tu.png" rel="nofollow noreferrer">messages need save in current user</a></p>