Built-in fields
Every User entity includes a set of built-in fields by default.| Field | Type | Description |
|---|---|---|
full_name | string | User’s display name |
email | string | User’s email address |
role | string | Either admin or user |
id, and created_date.
These fields are managed by the system and can’t be redefined in your schema.
Custom fields
To add custom fields, define a User schema containing only your additional fields. Trying to redefine any built-in fields will cause a validation error. Create aUser.json or User.jsonc file in your project’s entities directory. By default this is base44/entities/, but you can customize the path in your project configuration.
entities/User.json
entities push or deploy.
Complete example
Here’s a complete User schema with various field types:Use your fields
Once you’ve defined and pushed your User schema, you can reference your fields in security rules and access them in your app code.In security rules
You can use user fields to control access to other entities. For example, you might restrict users to only see records that belong to their company. To reference user fields in security rules, use the{{user.data.*}} template syntax:
company field matches their own.
In code
Access user fields through the SDK:This example uses a
base44 client. See Setting up the client for setup instructions.
