Could you explain a bit more what your trying to do ?
is it like access the status from the server SDK ? access the reason why it's blocked ? or maybe somthing else ?
i just need to access that status string from server: blocked or verified or unverified that it
Can you try doing something like this? -
const user = await users.get(userId);
console.log(user.status);
console.log(user.emailVerification);
let accountStatus = "";
if (!user.status) {
accountStatus = "blocked";
} else if (user.emailVerification) {
accountStatus = "verified";
} else {
accountStatus = "unverified";
}
console.log(accountStatus);
You can see various users properties available here - https://appwrite.io/docs/references/cloud/models/user
Thank you
Mention not ๐
How is there is command for that
<@1329045306997866509>
In my opinion, there isn't any built in property/command which directly returns status like "blocked", "verified", etc. It's neither mentioned in the docs, so you need to derive it explicitly
Recommended threads
- Framework categorization for Sites
Hello, I want to deploy my web app via Appwrite SItes. My web app is vite+reactjs. In the Appwrite docs, it creates a vite+react app, and chooses React from the...
- [SOLVED] Appwrite 25.1.0 returns Invalid...
I've already opened an issue on GitHub, but somewhat it doesn't seem like GitHub is monitored very closely, so I'm leaving a bug report here on Discord as well....
- Helping in unblock my account
I deleted my Appwrite Cloud account that was linked via GitHub. Now I activated my GitHub Student Pack and want to sign up again using the same GitHub account, ...