Back

[Solved] Can we use prefs to get the list of users?

  • 0
  • Users
  • Self Hosted
Abhishek
23 Oct, 2023, 13:56

I have a required where I need to get the list of user who has a specific value of a prefs. Here, I'm using server sdk.

TL;DR
Solution: No, you cannot use prefs to get the list of users. An alternative way is to set labels instead of preferences to create a tagging system for users.
Drake
23 Oct, 2023, 14:29

you cannot query on prefs.

Aditya Oberai
23 Oct, 2023, 14:31

An alternative way here could be to set labels instead of preferences if you're trying to setup a sort of tagging system for users

https://appwrite.io/docs/products/auth/labels

Abhishek
23 Oct, 2023, 18:07

Okay!

Aditya Oberai
23 Oct, 2023, 18:13

@Abhishek does that resolve your issue?

Abhishek
23 Oct, 2023, 18:23

I'm changing the data structure here. I created a DB table to map the user ID with specific properties to make it work according to our business logic.

Aditya Oberai
26 Oct, 2023, 09:58

That sounds good πŸ‘ @Abhishek are we good to mark this issue as solved?

Abhishek
26 Oct, 2023, 15:51

Yes

Abhishek
26 Oct, 2023, 15:51

[Solved] Can we use prefs to get the list of users?

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