Reputation: 293
Is there a way to get FIRUser data back from a Firebase by using their uid? For example:
let firebaseUser:FIRUser = FIRAuth().auth()?.getUserByUid(someuid)
I'm doing this because I want to allow a user to see a friend's display name in the app.
Thanks!
Upvotes: 0
Views: 909
Reputation: 4271
In order to get someone by their Uid, you would need to store The data that you want in the database. You can use child["user"] with child["Uid"] to store things like a user's name or photoURL. Check out this series of videos. He shows you how to do a signup flow with FIRAuth and FIRDatabase. The next video in the series shows how you query the data if you don't already know how to do that.
Upvotes: 1