user5812721
user5812721

Reputation: 293

Getting a FIRUser from their uid

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

Answers (1)

Dan Levy
Dan Levy

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

Related Questions