Link Search Menu Expand Document

Register User

For a User to perform Registration in your application, you will need to create a new Register Datasource.

Create User Register Datasource

  1. Create a new Register Screen.
  2. Add two Text Fields for email and password.
  3. Press the Datasource button, and then the + Create datasource button.
  4. Select the Kodika Server tab.
  5. Select the User Data Type.
  6. Select Register User.
  7. Bind the Email and Password parameters with the respective Text Fields.
  8. Connect at least the parameters of theOn Success response.
  9. Press Save.
  10. Close the Datasource popup.
  11. Add a Button and change its title to Register.
  12. Create a Start a Datasource Request Event Action in the On Click Event of the Register Button and select the newly created Datasource.

Request Parameters

Email

The email the new user will register with.

Validations:

  • When Email Exists response will be called, if the email already exists in the database.
  • When Invalid Email response will be called, if the email is not in a valid email address format.

Password

The password of the new user.

Validations:

Responses

Note: If any of the validations failed, the On Success response is not called, and only the respective failure response is called.

On Success

Called when the registration of the user is successful. The new user will be automatically logged in and set as Current User.

Parameters:

  • User: The newly registered user.

On Error

Called when there is an unknown error that is not handled by the other responses.

Parameters:

  • Error: A text with an error message.

When Offline

Called when the user has no Internet connection.

Parameters:

  • Error: A text with an error message.

When Email Exists

Called when email parameter is an email that exists in the database.

Parameters:

  • Error: A text with an error message.

When Invalid Email

Called when email parameter is a wrong formatted email address.

Parameters:

  • Error: A text with an error message.

When Weak Password

Called when password has less than 6 characters.

Parameters:

  • Error: A text with an error message.

Datasource automation

We would suggest setting the Datasource Spinner to ON and Auto start when Screen First Loads to OFF for this request, as we want to show a spinner during the request and execute the request only when the Button is pressed.