Hi, can i use account.get if i want to check if a user exists ? in a function
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
const res = users.list([
Query.equal('email', 'USER_EMAIL')
]);
const user = res.users[0]
Recommended threads
- Functions Problem
Whenever I run my AI Generate through Appwrite Functions, I am getting this Call Stack AIService.generateServer (src\services\ai\gemini.ts) next (<native>) ...
- How Can I Create landing page in appwrit...
I created function called invoice URL https://app.getrestt.com/v1/functions/invoice/executions?id=test-76f948fe83c43422561fe096c0674a1bd3ff0702cdfcf2444293ab31...
- DeploymentStatus enum value `canceled` m...
Hey, Sorry if it has been reported already, I found an issue using the Dart SDK where the `canceled` enum value is missing from `DeploymentStatus`. This causes...