# Create User Control

This control is used by the portal interface components (such as the Form control) to create a user.

## Overview

Using the Form control to submit fields to this control from a Page Flow, you can create a new user from within a portlet. The results can be displayed using an instance of ProfileWrapper if user creation was successful, or by displaying an error message if it fails.

NOTE: This control requires the UserManager EJB to be deployed in the application. Because the p13n_ejb.jar package contains this UserManagerEJB, it is always deployed as part of portal. To use it outside of the Portal, deploy the EJB to the application that has the WebApp which consumes the control.

## Annotations

The resourceType property specifies whether the resource is one of the following types:

- GlobalRoleResource
- EnterpriseRoleResource
- WebappRoleResource
- HierarchyRoleResource
- LeafRoleResource

## Security

The caller must be in the role of "PortalSystemAdministrator" or "Admin" to invoke method 'getAllGroupNames().

## Method Summary

com.bea.p13n.usermgmt.profile.ProfileWrapper | createUser(java.lang.String username, java.lang.String password, javax.servlet.http.HttpServletRequest request) Create a new user and return an object representing the user's information.

## Method Detail

### createUser

public com.bea.p13n.usermgmt.profile.ProfileWrapper createUser(java.lang.String username,
java.lang.String password,
javax.servlet.http.HttpServletRequest request)
throws P13nControlExceptionCreate a new user and return an object representing the user's information.

#### Parameters:

username - The user's login name
password - The user's password

#### Returns:

a ProfileWrapper representing the user's stored information.

#### Throws:

P13nControlException - if username or password is invalid, user already exists, or a remote exception occurs accessing the UserManager EJB.