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
- Active Running Project Deletion Alert Em...
Hi , I received an email alert from Appwrite today stating “your project will be deleted within 14 days if no action is taken,” though I have been actively usin...
- Project restoration button in console
The project restore button in console is taking no effect, i have tried several times and still nothing, it gives same popup if i reload
- SGP region: console returns 401 for all ...
Cloud console cannot open my projects in the Singapore (SGP) region. All console requests return HTTP 401, plus a 503 on analytics.appwrite.io. - Account email...