Custom user properties and user setup
When building apps with user logins, you have access to a
currentUser variable that provides the user’s email and roles.
However, many applications also have other per-user data, such as detailed profile data, team associations, etc. This is often stored in a database row per user.
You can have this additional user data always directly available on the
currentUser variable. This way, you don’t have to always manually add separate backend queries for this data on every page/component—the data will always be fetched and made available.
Set this up by going to the View As menu > User Properties > Configure.
Another common pattern for applications is requiring users to complete some setup, such as filling in their profile info, before they are able to continue.
With the advanced Condition Guard component, you can create flows in your application that direct users to first complete some setup process, for instance to fill out their name and profile information before admitting them further into the application.
The way it works is:
- Specify a condition to ensure—this lets you ensure that the user has completed the setup.
- If it’s satisfied, then you can bail. You can wrap all pages in this by adding it to your site-wide page wrapper component.
- Otherwise, perform some action—such as redirecting them to the user setup page.