User Record
Introduction
Whenever a new user signs up, a user record is automatically created for you to track user information other than their username, email or other user data.
The user record is created using the record type user
with
the column _id
storing the user ID, so you can use it
in the same way as using any other record types.
You can query and update a user record by manipulating using
the user
record type. Note that the _id
provided while creating a new user
record has to be unique - i.e. _id
must be not be used to create another user before.
Important note: This user record is created in the public database, i.e. it is visible to any other user. Therefore you should not store any sensitive information in this record type. You will need to create another record type with the private database for information that can only be accessed by the owner.
Saving to the current user record
Retrieving the current user record
Retrieving another user record by email or username
You can retrieve the public records of other users using their emails or usernames. You can provide either a single value or an array of emails/usernames. The promise will be resolved by an array of matched user records.
Below is an example querying a record with email value ben@oursky.com
.
You can also retrieve user record(s) provided you have their usernames and the correct access level.