How to deblock a blocked user?

Ok, i know how to block a member using code.
But how do i deblock a blocked member again ?

Who ever tries to answer → please don’t tell me → that i have to navigate to the wix-dashboard :wink:

Unfortunately, no.

My unstable workaround is to copy the internet request in CURL (dev mode in browser) then observe the pattern when unblock members. The CURL request can be used on Postman to generate code in Node js

Hmm, a bit to complicated workaround for me, since i do know nothing about CURL :grin:
So i will have to go the easier way of using a DB :sweat_smile: (i have an idea).:nerd_face:
I think i know ho to get back the blocked-user :sunglasses:
Thanks for clarifying, that there is no real API for that → (not very consistent).
So no matter how hard i try to avoid to create a third own DB (at the end i have to do it, because of leck of API-oppertynities).

Damn! :rofl:

https://www.wix.com/velo/forum/coding-with-velo/how-to-differ-between-wrong-password-wrong-email

Sorry, just some additional links for my own purposes.

@certified-code you cannot replay XHR requests that are made on a Wix site, the backend implements CORS, and they do use a session token to authenticate the requests as well, you might be able to replay a XHR request on the network section, but I don’t think it’s possible from anywhere else.

Have you actually tried what you’re suggesting?

You can put it in the backend code, call it from front end. Tried and working

Wix use Cookies to recognise users (wix account)

@certified-code I’ll DM you.

Sure, you can go to Slack :slight_smile:

@certified-code Will do :wink:

@certified-code
Sorry guys, but here my knowledge finds its boundaries. I do not understand what exactly you are talking about. Already have heard about CORS, but do not know exactly what it is, what it does, or how to use it. The same for XHR.

My own primary idea was…
-save contact-data in a variable or somewhere else
-delete contact
-recreate contact again immediately.

The contact should be deblocked again → the theoretical way.

@Ahmad

If you successfully get this work, you can create tutorials in these “special” workarounds​:smile::pray:

@certified-code
Would my idea work ?

@russian-dima you can maintain a dedicated DB for the members with a simple Boolean to indicate if they’re blocked or not, here’s how it works.

When users try to login/signup with an email, you use the user email to perform a query against that DB. If the email met the conditions, reject the -login/signup -request with a message: Your account has been blocked, please contact support.

I’m sure you don’t need a code snippet, you can figure it out on your own, but feel free to reach out if you need more help.

@certified-code haha, maybe :man_shrugging: We’ll see about that.

@ahmadnasriya Thanks Ahmad, my problem is just → how to DEBLOCK again.
All other is already working here… you can test it by yor own…

https://russian-dima.wixsite.com/login-system

You have an own TEST-ACCOUNT…(pw: like all the other test-accounts → 12345

Click on —> Contacts and take a look onto the already generated functions…:wink:

All i need is the → DEBLOCK-FUNCTION. All other works well (almost) :sweat_smile:

Just test it :laughing:

BTW: I solved it, without using an additional DB → (JUST Wix-CRM and PMD all i need) and i setted your ROLE to PRESIDENT (highest one in my DEMO-LOGIN-MGM).

To see more INFO —> USE-CONSOLE (console-logs are still opened!)

You can create some further accounts for testing (no APPROVMENT needed yet).
Try to block users, try to delete created users (please do not delete demo-users), don’t want to create all of them again xDDDDDD.

Ohhh, someone from AUSTRALIA joined my Login! Welcome to the TEST-ENVIRONMENT :stuck_out_tongue_winking_eye:


Ahmad i didn’t knew → that you are from Australia xDDDD :rofl:

Ok → looking onto the e-mail → now i know who it is :wink: welcome CCG

I can’t see any blocked user yet → you are not able to block a user?
Let me know, if something is not working :sweat_smile::sweat_smile::sweat_smile::sweat_smile: (except the → Clear-Contact-List) i just deactivated this function, do not want that one of the TEST-USERS deletes all test-users at once.

@russian-dima

Ahmad i didn’t knew → that you are from Australia xDDDD :rofl:
That’s because I’m not :joy::joy:

@ahmadnasriya I know! I was just joking :laughing:
Were you able to block users? Or does it not work for you?
Still can’t see any blocked user. You can block them all if you want (i can deblock them emmidiately from Dashboard), just do not delete them.

Want to know if my coding works or not xD → let me see a blocked user :sweat_smile::roll_eyes: