User profile
Updated
by Kate Santo
All of the relevant details about a user are stored in the user schema and consumed by different features in the app. In this article, we explain the role of each property in a user object.
When a new user onboards a Padoq app, the new user credentials are assigned to the partition where that app lives. And we may have more than one app in the same partition. This means that the credentials created in one app will work in any of the apps that share a partition. If the same user then onboards an app that lives in a different partition, they will be creating brand new credentials that will only work in apps within that same partition.
In the UI, a user's details are stored centrally in the user's account.
Many of the values we'll mention here are set when the user registers in the app. Check out our User registration (onboarding) guide for more details on that.
See for yourself
- You can download the iOS or Android app on your phone to follow this journey along. And you can also log in or sign up to the web app here
- You can also follow along by checking out the images or code snippets in this guide
- And you will find the relevant endpoints linked and explained in this guide, but the full API is documented in Swagger UI
What's in the user profile
We are going to explore the user schema. This is requested and sent by many endpoints in different parts of our apps. For example, addUser, getUser and updateUser all interact with that schema. Here's an overview of how the user profile is structured, with an explanation of what each property does.
username
- This is generated by the app, based on what the user enters in the UI (property 5 below). It's formatted text, so spaces are converted into underscores, for example. Some of our apps use this property, while others use
displayName
or a concatenation ofgivenName
andfamilyName
. This is used as default when the user joins a padoq and creates a persona. Although the user can change it
- This is generated by the app, based on what the user enters in the UI (property 5 below). It's formatted text, so spaces are converted into underscores, for example. Some of our apps use this property, while others use
gender
- The user's gender. This is an array with 4 possible values:
MALE
,FEMALE
,OTHER
andRATHER_NOT_SAY
- The user's gender. This is an array with 4 possible values:
emailAddress
- The user's email address. This string is also used for authentication and as the default email address when the user joins padoqs
phone
- The user's mobile phone number. This is also used for authentication purposes
displayName
- This is very similar to username above and it behaves pretty much the same way. The difference is that this is a string value and it's typed in by the user -so spaces and other characters are allowed
givenName
- User's first name. In the example below, it's Juliet
familyName
- User's surname
dateOfBirth
- User's date of birth. This is used to validate the user's age against the age requirements set for a padoq
location
- This property is an object with
name
andcoordinates
. The data is used in Explore to suggest padoqs near the user. Here's what this property looks like in our example: "location": {
"name": "Europe/Manchester",
"coordinates": [
53.466667,
-2.233333
]
}
- This property is an object with
registrationTimestamp
- This is the date and time when a user registers in the app. It's useful for reporting. For example, a client might want to know how many users are created every week or every month
termsAccepted
- This is a property with a boolean value. When the user onboards the app, T&Cs need to be accepted, so the value here should always be
true
- This is a property with a boolean value. When the user onboards the app, T&Cs need to be accepted, so the value here should always be
interestGroups
- This is an array that contains the interests that the user selects. This is used to suggest relevant padoqs in Explore. In our example, this property looks like this:
"interestGroups": [
"Movies",
"Technology",
"Basketball"
]
padoqViewOrder
- This property sets the order in which padoqs should appear in My Padoqs. The order is set by the user via a tool in the UI
attributes
- This property stores information that's not captured elsewhere in the user object. For example, if an app has membership levels, that would appear inside this property
clientAttributes
- These are exactly the same as attributes above, but unique to a client. They might be formatted differently or sourced from a third party, so they are stored in a separate object
failedLoginCount
- The value of this property is a number. It sets how many times the user has tried to log in and failed. This number can then be used to lock an account. Only a user with Ops access can reset the value to
0
and unlock an account
- The value of this property is a number. It sets how many times the user has tried to log in and failed. This number can then be used to lock an account. Only a user with Ops access can reset the value to
payerId
- An ID for the user to use with payment systems
privileges
- This is where permission levels are set. In the Padoq app, these can be guest, member, admin and super admin. In other apps it might be things like silver and gold, for example
avatarUri
- This is the location where the user's avatar is stored. It's used in different parts of the app: in the user's profile/account, in post headers, etc.
And here's how a full user profile might look:
{
"username": "jsmith",
"gender": "FEMALE",
"emailAddress": "juliet.smith@example.com",
"phone": "+15005550006",
"displayName": "Juliet Smith",
"givenName": "Juliet",
"familyName": "Smith",
"dateOfBirth": "1999-01-01",
"location": {
"name": "Europe/Manchester",
"coordinates": [
53.466667,
-2.233333
]
},
"registrationTimestamp": "2002-08-03T21:42:35Z",
"termsAccepted": true,
"interestGroups": [
"Movies",
"Technology",
"Basketball"
],
"padoqViewOrder": [
"my-place",
"another-place"
],
"attributes": {},
"clientAttributes": {},
"failedLoginCount": 2,
"payerId": "string",
"privileges": "string",
"avatarUri": "https://media.padoq.com/avatar/7004cd0f-2b7c-4feb-84ce-318341fd573b"
}