# <um:createUser> Tag

The <um:createUser> tag creates a new user profile. This tag has no enclosed body. Although classified as a Group-User management tag, this tag can be used in conjunction with run-time activities, in that it will persist any properties associated with a current Anonymous User Profile if specified.

Execution of this tag requires the logged in user to have administrator rights.

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. servlets.jsp.tags.UserManagementTag- Constants" %>

## Syntax

<tagName attribute="value" />

## Attributes

username

Required (String) - The name of the new user. Example: "<%=username%>"

password

Required (String) - The password for the new user. Example: "<%=password%>"

profileType

Optional (String) - Specifies the extended type of user (for example, WLCS_Customer) to create a user of that type. When Building a Commerce Application functionality, you must designate profileType="WLCS_Customer".

saveAnonymous

Optional (String) - Whether to persist current anonymous user profile attributes in the newly-created user's profile. Defaults to false. Example: "false"

id

Optional (String) - A variable name to which the created User object is available for the duration of the page's scope.

result

Required (String) - The name of an Integer variable to which the result of the create user operation is assigned.

Possible values:

- Success: UserManagementTagConstants.CREATE_USER_OK.
- Error encountered: UserManagementTagConstants.CREATE_USER_FAILED.
- A user with the specified username already exists: UserManagementTagConstants.USER_EXISTS.

## Example

This example shows how to use <um:createUser> to create a new user.

    <um:createUser userName="<%=username%>" password="<%=password%>" result="result"/>

Related Topics

<um:createGroup> Tag