User Service

Creating User with App42 platform for your app is pretty straightforward. you have to just put few lines of code in your app and you are done. Minimal parameter requirement for user creation are username, password and email. Following snippet will create user in App42 Cloud.

All saved app users can be viewed inside AppHQ console under Business Service > User Service option.

Signup User

Following is the snippet to create user with default parameter username, password and email id.

AUserName : string; 
APassword : string; 
AUserData : TJSONObject;
ACreatedObject : TBackendEntityValue;
BackendUsers.Users.SignupUser(AUserName, APassword, AUserData, ACreatedObject); 

Login User

Once user is register with App42 platform, you can do user login in your app in just few lines of code.

AUserName : string; 
APassword : string; 
ALogin : TBackendEntityValue; 
AJSON : TJSONArray;  
BackendUsers.Users.LoginUser(AUserName, APassword, ALogin, AJSON);

Update User

Updates the User data in App42 Cloud database.

AObject : TBackendEntityValue; 
AUserData : TJSONObject; 
AUpdatedObject : TBackendEntityValue; 
BackendUsers.Users.UpdateUser(AObject, AUserData, AUpdatedObject);

Find User

Fetch the user details based on its entitiy value.

AObject : TBackendEntityValue; 
AUser : TBackendEntityValue; 
AJSON : TJSONArray; 
BackendUsers.Users.FindUser(AObject, AUser, AJSON); 

Query UserName

Fetch your user details based on user name.

AUserName : string 
AUser : TBackendEntityValue; 
AJSON : TJSONArray; 
BackendUsers.Users.QueryUserName(AUserName, AUser, AJSON);

Query Users

Fetch your user details based on user data or you can create custom query for finding the details based on its profile.Also, you can customize your user search by applying the custom query on it.

AQuery : TArray<string>; // Use Correct Query syntax. Follow Using Queries.
AJSONArray : TJSONArray;
AMetaArray : TArray<TBackendEntityValue>; 
BackendUsers.Users.QueryUsers(AQuery, AJSONArray, AMetaArray);

Delete User

Delete all the user details from the cloud database.

AObject : TBackendEntityValue; 
BackendUsers.Users.DeleteUser(AObject);