I want to fetch other user data using its userid but i can't achive it due to if i use account.get it will return current logged user to me what to do to get other user data with its userid.
From a Client SDK you can’t get data of other users.
then where to get??
can u share resources to get through it
You could create a Function which uses the Server SDK to call the users.get() method. Just make sure you set correct permissions on the Function, and only return the fields you really need.
let me work on it.
Why?
Actually I'm building a blogging website where I need this feature to fetch user details using its userid
Why do you need to fetch user details?
I want that to user can view others profile 🤔
The typical approach to this is to create a Profiles collection for what should be visible. The built in users is not publicly accessible because there's a lot of private data in there
You can set up a function to automatically populate and update the documents in the profiles collection
Ohh should I create function which is store all new user public data into a document and then access it with I'd great suggestion thanks Steven
But how do I get a foreign key reference to this private user table? Managing this using function seems really backwards.
That’s why I suggested a Function which only returns the required attributes
You’d set the Document ID to be the User ID, presumably
But as I see it, there is no way to actually get a link to the private user table. So they would just share the user ID and not actually be in any relationship, thus not guaranteeing data integrity.
Well, my understanding is that the officially recommended method would be to have a Function triggered on user data update
Yeah, it cause but we dosen't have any other option now
Recommended threads
- No server error on selfhosted appwrite
Please help me, my clients is ask what happen on their data? How can i make it up again?
- Upgrading selfhost version?
It is okay to upgrade version to higher one, of my current version is 1.7.4 to 1.8.1. Is that safe to do cause my clients already have data on that? Also is a...
- Streamlit UI and local DB
I want to use Appwrite for automation, like run watchdog service every morning 3 am. Anyone got suggestions, already explored github and documentation no luck. ...