zach wilcox
zach wilcox

Reputation: 75

access users information by only having their UID

I am trying to access users information by only having their uid. I am not sure how to go about this and was wondering if anyone had any clues. In the Image below, this user has a post, but inside of this post is just information about the post, not about the user. I was thinking that since I had saved this post information under the users uid, I could then go in and access that users information, such as name and profile image to have displayed on top of the post. or Should I save the users name and profile image as well when I update the post?

Image

Upvotes: 0

Views: 60

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317467

If you want per-user information to be available to others, you will have to store it somewhere in your database. You can store it in node specific to that user, using their UID, or you can store it along with the data that references it. It's completely up to you, but you have to store it somewhere.

Upvotes: 1

Related Questions