You can add some custom fields (e.g. "age", "gender" and "birthday") too. You can use any field names as long as they are not predefined by the SDK. To learn more about the predefined fields, please read the JSDoc.
Setting and updating custom fields
The following example illustrates how to set the custom fields. You can delete custom fields by passing the field name in the array.
If an existing field is not explicitly specified for the update operation, the field remains unchanged on Kii Cloud.
The fields are updated on Kii Cloud and in the KiiUser instance after the update() method is successfully completed.
You can update predefiend and custom fields at the same time.
Only users themselves can update their fields. See User Attributes to learn more on who can access the user's fields.
Getting custom fields
The following example illustrates how to get the custom fields.
Please call the get method to get the field values.
Setting custom fields upon the user registration
The following example illustrates how to set the custom fields upon the user registration.
As shown in the sample code, you can set the custom fields with the set method after creating a KiiUser instance.