User Status and Email Confirmation¶
Users table is where registered users are stored in Backendless. The table has a special, system-level column called
As you can see in the screenshot above, the user accounts may have one of the following three statuses:
ENABLED- user can login into the app.
DISABLED- user cannot login into the app.
EMAIL_CONFIRMATION_PENDING- this is an intermediary state of a user account until they confirm their email address by clicking a link in the email message sent to them. Users in this status cannot login. When a user confirms their email address, Backendless automatically changes this status to
ENABLED. For more information about email confirmations, see the User Registration section of this guide.
It is possible to change user status programmatically using the API described below. The APIs can be used only from cloud code implemented in either Java, JS or Codeless. This restriction is in place to make sure the security of your app is not compromised. The API allows the following status transitions:
// ENABLE USER // blocking API public void Backendless.UserService.enableUser( userObjectId ); // non-blocking API public void Backendless.UserService.enableUser( userObjectId, AsyncCallback<Void> responder ); // DISABLE USER // blocking API public void Backendless.UserService.disableUser( userObjectId ); // non-blocking API public void Backendless.UserService.disableUser( userObjectId, AsyncCallback<Void> responder );
||objectId value of the user account to be either enabled or disabled.|
||a callback object which will receive a callback when the method successfully changes the user status. Applies to the non-blocking method only.|