Search.../

blockByEmail( )

Blocks a member from logging into the site.

Description

The blockByEmail() function returns a Promise that resolves when the specified user has been blocked.

Pass the member's email address in the email parameter.

Syntax

function blockByEmail(email: string): Promise<void>

blockByEmail Parameters

NAME
TYPE
DESCRIPTION
email
string

Email address of the user to approve.

Returns

Fulfilled - When specified member is blocked. Rejected - Error message.

Return Type:

Promise<void>

Was this helpful?

Block a member using an email address

Copy Code
1import wixUsersBackend from 'wix-users-backend';
2
3export function myBackendFunction(email) {
4 wixUsersBackend.blockByEmail(email)
5 .then( () => {
6 // user has been blocked
7 } );
8 }