
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
- How To Send Email Verification From Serv...
How can I send email verification from server action or component after sign up in next.js ? Is there any way ?
- x-appwrite-user-jwt missing
Even for logged in users I can't see "x-appwrite-user-jwt" or "x-appwrite-user-id" in headers of an appwrite function. I'm trying to send "x-appwrite-user-id" m...
- ATTRIBUTE NOT SHOWING DELETE
Hi, I'm trying to delete an attribute in my collection but it won't delete, It's not even showing the delete when I click on the hamburger icon, Its showing onl...
