Reputation: 1399
Currently I have my app making user profiles and generating an autoID to my database using the following:
databaseRef.child("users").childByAutoId().setValue(user)
Instead of using .childByAutoID, I'd like that to be the User UID that's generated using the Firebase User UID value, however I'm not sure how to swap that into my code above.
Upvotes: 0
Views: 1273
Reputation: 9945
databaseRef.child("users").child(FIRAuth.auth()!.currentUser!.uid).setValue(user)
Upvotes: 2