Back

Fetching prefs of a user by ID?

  • 0
  • Web
saricden
3 Jun, 2023, 07:06

Is there a method in the client SDK which would allow me to get a user other than the currently logged in user by ID and fetch their pref key/vals?

TL;DR
User is trying to fetch other users' preferences by ID in order to display profile pictures and usernames. They are considering creating a users collection to store user data. They are also unsure if it's the right practice to store avatar file IDs, usernames, etc. in user preferences. They ask if there is a method in the client SDK to fetch a user by ID and fetch their preferences. No solution is provided in the thread.
saricden
3 Jun, 2023, 07:25

Also, is it considered the right practice to store things like avatar file IDs, usernames, etc. in user prefs?

saricden
3 Jun, 2023, 07:25

Or should I be making a DB collection to store such user data?

saricden
3 Jun, 2023, 07:35

I'm going to refactor to user a DB collection for now, but if anyone knows the correct answer to this plz @ ping me here πŸ™

D5
3 Jun, 2023, 10:04

You mean get other users data?

Drake
3 Jun, 2023, 14:43

Yes, I would recommend creating a users collection

saricden
3 Jun, 2023, 15:59

Thanks Steven, yeah that's what I ended up doing and it's working well so far

saricden
3 Jun, 2023, 15:59

Yeah the original issue was getting other users data

saricden
3 Jun, 2023, 16:00

Just for like, displaying profile pictures, usernames, etc etc

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more