Subscribe rss
Blog categories
All | Backendless features
Feature 38: Dynamic user definition with the Registration API
February 14, 2015 by markpiller

In one of my previous articles I have reviewed how to register app users with the API. By default a Backendless backend declares a user entity with three properties: email, password and name. The “email” property is configured as identity by default, meaning its value should be passed into the login API request.

Typically user entity properties correspond to the fields in the app’s user registration form. When a user registers with the app, the data from the registration form is sent to the server using the User Registration API. While processing a user registration request, Backendless extracts information from the incoming user object and if it contains a new (undeclared on the backend) property, the property is added to the user entity schema. Consider the following sample code:

Synchronous API (Plain Java):

Asynchronous API (Android and Plain Java):

Once you run the code Backendless creates the “birthdate” and “employeeId” properties. You can verify it in Backendless console:

  1. Login to Backendless, select your app and click the Users icon.
  2. The User Properties screen displays the user entity definition:
  3. The registered user also appears in the Users table available in the Data screen:

The behavior of declaring user entity properties dynamically can be turned off by using the Enable Dynamic User Definition toggle. The toggle is located on the Users > User Properties screen:

Share this post
Tweet about this on TwitterShare on FacebookGoogle+