block( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Blocks a member from logging in to the site using an ID or email address.

To unblock the member and allow them to log in to the site, use the approve() function.

Method Declaration
Copy
function block(options: BlockOptions): Promise<void>;
Method Parameters
optionsBlockOptions

Options for blocking a member from logging in.

JavaScript
import { authentication } from "wix-members.v2"; async function block(options) { try { const result = await authentication.block(options); return result; } catch (error) { console.error(error); // Handle the error } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?