Hi, can i use account.get if i want to check if a user exists ? in a function
TL;DR
Developers can use `users.get(USER_ID)` to check if a user exists, instead of `account.get()`.No, account.get() gets the currently logged in user.
You would want to use users.get(USER_ID)
https://appwrite.io/docs/references/cloud/server-nodejs/users#get
thank you so much, ill try it :)
and can i somehow search by email?
sure, try
TypeScript
const res = users.list([
Query.equal('email', 'USER_EMAIL')
]);
const user = res.users[0]
Recommended threads
- User column is processing
I am still encountering the processing tag after creating a column in my database. and its not a network or refresh issue, i have refreshed over and over, shutd...
- Custom API domain is unreachable
Earlier my custom api domain was working fine. Now it seems to be offline without a trace a few hours later. I didn't change anything, all the relevant DNS reco...
- "Invalid console fingerprint" when unpau...
I've tried logging out and logging back in, still can't figure out why this is happening.