# Update user account

The Update user account action node updates an existing [user](https://docs.appfarm.io/reference/security/users) in the solution. [Roles](https://docs.appfarm.io/reference/security/roles) can be assigned and or removed to determine the user's permissions. A reset password or login link email can be automatically triggered.

## Usage

This action node is used when you would like client users to be able to update their own information or update other users in a solution. For example, a client user with a custom *Administrator* role may be granted the permission to assign and remove roles for other users.

When the action node successfully completes, the User object is immediately updated in the database. It is not necessary to persist any changes.

{% hint style="warning" %}
**Important**

* A user's email address cannot be updated. If you need to update an email address you must delete the user and create a new one.
* A user does not require any special permissions to update their own first name, last name and phone number.
* The user running this action node must have a role with the appropriate permissions to update a user and assign and remove any selected roles. Read more under [Users](https://docs.appfarm.io/reference/security/users#permissions).
* The appropriate user account manipulation properties must be enabled for the relevant [environment](https://docs.appfarm.io/reference/configuration/environments#user-account-manipulation).
  {% endhint %}

## Properties

<table><thead><tr><th width="238">Property</th><th>Description</th></tr></thead><tbody><tr><td><strong>User Account</strong></td><td>The <a href="../../reference/apps/data/data-sources">data source</a> containing the User object to update.</td></tr><tr><td><strong>First Name</strong></td><td>The user's first name.</td></tr><tr><td><strong>Last Name</strong></td><td>The user's last name.</td></tr><tr><td><strong>Phone</strong></td><td>The user's phone number.</td></tr><tr><td><strong>Add Roles</strong></td><td><a href="../../reference/security/roles">Roles</a> to assign to the user. Roles selected here will be in addition to any existing roles. If a role is also selected in <strong>Remove Roles</strong>, the user will not be assigned that role.</td></tr><tr><td><strong>Remove Roles</strong></td><td><a href="../../reference/security/roles">Roles</a> to remove from the user.</td></tr><tr><td><strong>Reset Password</strong></td><td>Send an email to the user with a link to reset their password. This email template can be customized in a <a href="../../../reference/configuration/login#mail-templates">Login configuration</a>, or overridden for this action node only by selecting <strong>Override Default Mail</strong>.</td></tr><tr><td><strong>Send Login Link</strong></td><td>Send an email to the user with a link to log in immediately. This email template can be customized in a <a href="../../../reference/configuration/login#mail-templates">Login configuration</a>, or overridden for this action node only by selecting <strong>Override Default Mail</strong>.</td></tr><tr><td><strong>Override Default Mail</strong></td><td><p><em>Available if</em> <strong>Reset Password</strong> <em>or</em> <strong>Send Login Link</strong> <em>is selected.</em></p><p>Override the subject and body of the email.</p></td></tr><tr><td><strong>Link TTL</strong></td><td><p><em>Available if</em> <strong>Override Default Email</strong> <em>is selected.</em></p><p>Specify how long the reset password or login link in the email will be valid, in seconds, up to a maximum of 1 week. The default is 900 seconds (15 minutes).</p></td></tr><tr><td><strong>Login Link Redirect Path</strong></td><td><em>Available if</em> <strong>Override Default Email</strong> <em>is selected.</em><br>Redirect the user to the specified path after they click the login link. The path must start at the domain root, for example: <code>/READABLE_ID/VIEW_NAME/SUBVIEW_NAME?URL_PARAM=value</code>.</td></tr><tr><td><strong>Subject</strong></td><td><em>Available if</em> <strong>Override Default Email</strong> <em>is selected.</em><br>Override the subject of the email.</td></tr><tr><td><strong>Body Text Template</strong></td><td><em>Available if</em> <strong>Override Default Mail</strong> <em>is selected.</em><br>Override the plain text email body. See <a href="../../../reference/configuration/login#mail-templates">Login configuration</a> for available parameters.</td></tr><tr><td><strong>Body HTML Template</strong></td><td><em>Available if</em> <strong>Override Default Email</strong> <em>is selected.</em><br>Override the HTML email body. See <a href="../../../reference/configuration/login#mail-templates">Login configuration</a> for available parameters. A <strong>Body Text Template</strong> is also required when you specify an HTML template.</td></tr></tbody></table>
