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
- I’m facing an issue with deployments on ...
Hi Appwrite Support, I’m facing an issue with deployments on Appwrite Sites. A few days ago (around 3–4 days back), everything was working perfectly. My deplo...
- Redis with user/pass doesn't work NO_AUT...
When trying to externalize my redis to a valkey server, i saw the user/pass doesn't work. After looking the appwrite code, i saw some of the init does not pass...
- Appwrite Cloud project is paused and nev...
Hi Appwrite Team & Community, I am facing a problem with one of my Appwrite Cloud projects which seems to be identical to the other cases of "paused projects" ...