Disable backendles user in javascript

i want to set userStatus disabled and register him and enable it by code after.
i’ve tried user.userStatus=“DISABLED” | user.userStatus=“disabled”
but nothing seems to work.
I want to build this structure because i’m working with 2FA so i need to register the user disabled and after verification i want to enable him.

Hello @adel_kasno

You should use

  await Backendless.UserService.disableUser('USER_OBJECT_ID')

  await Backendless.UserService.enableUser('USER_OBJECT_ID')

Regards, Vlad

1 Like