User Registration
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Tokens,Users
Creates a new user account on the current site. You give it an email, a username (or use the email as the username), a password (or let it generate one), and optionally a first and last name.
After the account is created, the [NewUserId] token holds the new user's ID, and the [User:*] tokens refer to the new user in the actions that follow. The action doesn't sign the user in. Add a User Login after it if you want that.
Typical Use Cases
- Build a custom registration form
- Add users from an admin screen, for example a listing of pending sign-ups
- Create an account with a random password and email the details to the user
- Create accounts that stay unauthorized until the user verifies their email or an admin approves them
Don't use it to
- Update an existing user. Use Update User Profile instead.
- Save profile properties other than first name, last name and email. Add Update User Profile after this action.
- Give the user roles. Add Grant User Role after this action.
Related Actions
| Action Name | Description |
|---|---|
| User Login | Signs the new user in. |
| Update User Profile | Saves more profile properties for the new user. |
| Grant User Role | Adds the new user to a role. |
| Authorize User | Authorizes an account later, for example after email verification. |
| Load User | Loads a user and makes them the current user for the actions that follow. |
| Send Email | Sends your own welcome or verification email. |
| Send User Reset Password Email | Lets the user set their own password, for example after a random one. |
Input Parameter Reference
In forms and listings, most parameters let you pick a field. You can also switch to an expression and use a token.
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Username | The username for the new account. Ignored when Register with email is on. If it's empty, the action looks for a username field or a [username] token. | Yes | empty string | Yes, unless Register with email is on |
| Register with email | When on, the email is used as the username. | No | false | No |
| Password | The password for the new account. Ignored when Generate random password is on. If it's empty, the action looks for a password confirmation field, a password field, or a [password] token. | Yes | empty string | Yes, unless Generate random password is on |
| Generate random password | When on, the action generates a password and saves it in the [RegRandomPass] token, for example to send it by email. | No | false | No |
The email for the new account. If it's empty, the action looks for an email field or an [email] token. It must match the site's email format. | Yes | empty string | Yes | |
| First Name | The first name. If it's empty, the action uses the [FirstName] token, if there is one. | Yes | empty string | No |
| Last Name | The last name. If it's empty, the action uses the [LastName] token, if there is one. | Yes | empty string | No |
| Send standard registration email | When on, the site's standard registration email is sent to the new user. The type of email depends on Authorize users who register with this form. Only sent from forms and listings. Not shown in Automation. | No | false | No |
| Authorize users who register with this form | Whether the new account is authorized (approved) and can sign in. See Authorization. | No | Authorize | No |
Output Parameters Reference
| Token | Description |
|---|---|
[NewUserId] | The ID of the new user. |
[RegRandomPass] | The generated password. Only set when Generate random password is on. |
[User:*] | After the action, these tokens refer to the new user, for example [User:UserID] or [User:Email]. |
Authorization
| Option | Account | Standard email sent |
|---|---|---|
| Authorize | Authorized. The user can sign in straight away. | The public registration (welcome) email. |
| Don't Authorize | Not authorized. The user can't sign in until the account is authorized. | The verified registration email, which asks the user to verify their email. |
| Inherit DNN Settings | Follows the site's User Registration setting. Only Public registration authorizes the account. | The email that matches the site setting: private, public or verified registration. |
The site's registration setting doesn't stop the action. It creates the account even if the site is set to no registration.
The account that's created
- Username: from Username, or the email with Register with email.
- Display name: first name and last name, separated by a space.
- Email: set on the account and the
Emailprofile property. - Password: must meet the site's password rules, such as minimum length.
If the account can't be created, the action fails with the site's message. Common reasons:
- The username is already taken.
- The email is already used and the site requires unique emails.
- The password doesn't meet the password rules.
Other errors:
| Error | Cause |
|---|---|
Could not determine email field needed to create new user account! | No email was found. |
Could not determine username field needed to create new user account! | No username was found and Register with email is off. |
Could not determine password field needed to create new user account! | No password was found and Generate random password is off. |
The username does not meet the required format. | The email doesn't match the site's email format. The message says "username" even when it's the email that's wrong. |
Considerations
- An email is always required, even when you set a username.
- The user isn't signed in. Add User Login after this action. If you leave its Username and Password empty, it picks up the email (with Register with email) and
[RegRandomPass]from this action. - The current user changes. After this action,
[User:*]tokens refer to the new user, not the person who submitted the form. If an admin creates users from a screen, read the admin's details before this action. - Standard email only in forms and listings. Send standard registration email does nothing in API endpoints and workflows. Use Send Email there.
- Treat
[RegRandomPass]carefully. Don't show it on the page or write it to logs. Consider sending a reset link with Send User Reset Password Email instead. - Protect public registration forms. Anyone who can submit the form can create an account. Limit who can reach the form, or create unauthorized accounts and approve them later.
- Show a friendly message for duplicates. The action fails if the username is taken. Catch the error with Execute Actions and show your own message.
Examples
To understand how to use the below examples, please see Running Examples.
1. Register with email and password
This action creates an authorized account that uses the email as the username. It takes the values from the Email, Password, FirstName and LastName fields, and sends the site's welcome email.
{
"Title": "User Registration",
"ActionType": "UserManagement_UserRegistration",
"Description": "Create the account from the registration form",
"Parameters": {
"RegisterWithEmail": true,
"PasswordField": "[Password]",
"RandomPass": false,
"EmailField": "[Email]",
"FirstName": "[FirstName]",
"LastName": "[LastName]",
"SendDnnMail": true,
"Authorization": "Authorize"
}
}
2. Create an unauthorized account with a random password
This action creates an account that can't sign in yet, with a generated password. Later actions can send a verification email with Send Email and authorize the account with Authorize User once it's verified.
{
"Title": "User Registration",
"ActionType": "UserManagement_UserRegistration",
"Description": "Create a pending account",
"Parameters": {
"UsernameField": "[Username]",
"RegisterWithEmail": false,
"RandomPass": true,
"EmailField": "[Email]",
"FirstName": "[FirstName]",
"LastName": "[LastName]",
"SendDnnMail": false,
"Authorization": "NoAuthorize"
}
}
Revised 09/28/2026