# <ugm:setPassword> Tag

The <ugm:setPassword> tag updates the password for the user corresponding to the provided username. Users must be logged in to change their passwords.

Note: All User Management tags send results to the same file. If you are checking for results, include this import statement at the top of the page: <%@ page import="com.bea.p13n.usermgmt.taglib.UserManagementTagConstants" %>

## Syntax

<tagName attribute="value" />

## Attributes

atnProvider

Optional (String) - The name of the authentication provider to use. The default setting is the WebLogic Server DefaultAuthenticator. The authentication provider must provide write access. See Using Multiple Authentication Providers in Portal Development for more information.

username

Required (String) - The username of the user whose password is to be changed.

password

Required (String) - The new user password.

result

Required (Integer) - The name of an Integer variable to which the result of the set password operation is assigned.

Possible values:

- Success: UserManagementTagConstants.SET_PASSWORD_OK.
- Failure: UserManagementTagConstants.SET_PASSWORD_FAILED.

## Example

The following example resets a user's password.

    <ugm:setPassword username="<%userName>" password="<%password>" result="<%result>" />