I have two view controllers, one where the user register (email, password ) himself into the app, and an other one where he can choose a username, I manage to get the first view controller working with Firebase this means that my user is authenticated and I manage to enter his email adress into the realtime database, but I have problem updating the username he choose to the database, I tried this :
self.ref.child("Users").child(user.uid).setValue(["username": usernameTextfield.text])
I believe this is not working because my viewcontroller doesn't know the object user. Can someone tell me how to do it. Thanks