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
- total parameter not working correctly in...
Hello Appwrite team, I'm experiencing issues with the total parameter in the listRows() method (TablesDB) across multiple SDKs. **Issue 1**: Node.js SDK (node...
- rxdb integration code not working
https://appwrite.io/blog/post/offline-first-journal This code does not work with rxdb and appwrite packages set to february releases nor newest releases
- Costom domain Issues
Hi Appwrite team We’re having issues verifying a custom domain. We added the required CNAME and CAA records to our DNS provider and waited for at least 2 days a...