Skip to main content
Version: 1.28 (Current)

Update User Profile

Audience: Low-code Engineers

Skill Prerequisites: Actions, User management

Updates a user's account and profile. It can change the password, display name and email, and any profile property defined on the portal, such as FirstName, LastName, City or a custom property.

It updates the user in User Identifier. If that's empty, it updates the current user. That's the logged-in user, or the user set by Load User or Change User. Only the settings you fill in are changed.

Typical Use Cases​

  • Let users edit their own profile on a "My Account" form
  • Save extra registration data after User Registration, such as a phone number or company
  • Update a user picked in a Listing or an admin grid
  • Set a profile photo from an upload field

Don't use it to​

Action NameDescription
Load UserMakes a user the current user, so this action can update them with an empty User Identifier.
Change UserChanges the current user for the actions that follow.
User RegistrationCreates a new user.
Update UsernameChanges a user's username.
User Password ValidationChecks a password before you save it.
Grant User RoleGrants roles to a user.
Clear User CacheClears DNN's cached copy of a user.

Input Parameter Reference​

The parameters unique to this action are listed below. Review the common parameters for all actions here.

In Forms and Grids, Password Field, Also update Display Name with, Update Email with and the Value column let you pick a form field, or click EXPR to type a value with tokens. In other modules, such as API endpoints, workflows and Automation, they're text boxes that support tokens.

ParameterDescriptionSupports TokensDefaultRequired
User IdentifierThe user to update, as a user ID, email or username. Leave it empty to update the current user. See How the user is found.Yesempty stringNo
Password FieldThe new password. In Forms, pick a password field. Leave it empty to keep the current password.Yesempty stringNo
Also update Display Name withThe new display name. Leave it empty to keep the current display name.Yesempty stringNo
Update Email withThe new email address. In Forms, pick an email field. Leave it empty to keep the current email.Yesempty stringNo
Additional User PropertiesA list of profile properties to set. Click Add, pick a User Profile Property on the left, and set its Value on the right. The property list comes from the portal's profile properties. Click EXPR on the property to type its name instead.YesemptyNo

Output Parameters Reference​

This action doesn't create any tokens. To read the new values, use [User:*] tokens, for example [User:DisplayName].

How the user is found​

User Identifier is looked up on the current portal in this order:

  1. If it's a number, it's treated as a user ID.
  2. Otherwise, it's matched against email addresses.
  3. If no email matches, it's matched against usernames.

If no user is found, the action fails with an error. Superusers (hosts) can't be updated. The action fails with Invalid super user, even when the superuser is the current user.

What gets updated​

SettingEmpty valueNotes
PasswordPassword isn't changedThe new password must meet the site's password rules, or the action fails with Invalid Password. The old password isn't needed.
Display NameDisplay name isn't changed
EmailEmail isn't changedThe action doesn't check the format or whether another user already has it.
Additional User PropertiesThe property is clearedEvery row in the list is saved, even when its value is empty.

For Additional User Properties:

  • The property must already exist on the portal. Rows with an unknown property name are skipped without an error. Property names must match exactly.
  • Image properties, such as Photo, take a file. Pick an upload field or a file manager field, or type a file path. The file is copied into the user's folder. If the file isn't found in the DNN file manager, the action fails. An empty value removes the photo.
  • Country, Region and US State properties accept the name or value of an entry in DNN's lists. The matching list entry is saved.
  • A value picked from a form field is saved as it is. Tokens are only replaced in values typed with EXPR, or in text boxes outside Forms and Grids.

Considerations​

  • Check who can run it. The action doesn't check if the person running it may change the target user. If User Identifier comes from a form field, the URL or an API request, anyone who can submit it can change another user's email or password, including administrators. On public forms, leave User Identifier empty so users only update themselves. Otherwise, add a condition that checks the caller's role.
  • It updates one user. With an empty User Identifier, only the current user is updated. Other users in the context's list, for example from Load Users from SQL, aren't changed.
  • Validate before saving. Use form validation or User Password Validation to give users a clear message. The action's own errors aren't friendly.
  • Changing the portal administrator also clears the portal's cache.
  • Tokens in display names. Tokens in the display name value are replaced, even when the value comes from a form field.

Examples​

tip

To understand how to use the below examples, please see Running Examples.

1. Let users update their own profile​

This action runs on a form's submit button. It updates the logged-in user's display name and email from the DisplayName and Email fields, and their first name, last name and phone from the FirstName, LastName and Phone fields.

{
"Title": "Update User Profile",
"ActionType": "UpdateUserProfile.v2",
"Description": "Update the logged-in user's profile",
"Parameters": {
"UserIdentifier": "",
"UpdatePasswordField": {
"Expression": "",
"Value": "",
"IsExpression": false
},
"UpdateDisplayNameField": {
"Expression": "",
"Value": "DisplayName",
"IsExpression": false
},
"UpdateEmailField": {
"Expression": "",
"Value": "Email",
"IsExpression": false
},
"AdditionalProperties": [
{
"UserProfileProperty": {
"Value": "FirstName",
"IsExpression": false,
"Parameters": {}
},
"PropertyValue": {
"Value": "FirstName",
"IsExpression": false
}
},
{
"UserProfileProperty": {
"Value": "LastName",
"IsExpression": false,
"Parameters": {}
},
"PropertyValue": {
"Value": "LastName",
"IsExpression": false
}
},
{
"UserProfileProperty": {
"Value": "Telephone",
"IsExpression": false,
"Parameters": {}
},
"PropertyValue": {
"Value": "Phone",
"IsExpression": false
}
}
]
}
}

2. Build the display name from first and last name​

This action sets the logged-in user's display name to the values of the FirstName and LastName fields, separated by a space. It only runs when both fields have a value.

{
"Title": "Update User Profile",
"ActionType": "UpdateUserProfile.v2",
"Description": "Set the display name from first and last name",
"Condition": "[FirstName] != \"\" && [LastName] != \"\"",
"Parameters": {
"UserIdentifier": "",
"UpdatePasswordField": {
"Expression": "",
"Value": "",
"IsExpression": false
},
"UpdateDisplayNameField": {
"Expression": "[FirstName] [LastName]",
"Value": "",
"IsExpression": true
},
"UpdateEmailField": {
"Expression": "",
"Value": "",
"IsExpression": false
},
"AdditionalProperties": []
}
}

Revised 09/28/2026