String fullName = getParameterAsString(UserProfile.FULL_NAME);
String description = getParameterAsString(UserProfile.DESCRIPTION);
String email = getParameterAsString(UserProfile.EMAIL);
String className = getParameterAsString(CLASS_NAME);
User user;
if (className.equals(LDAPUser.class.getName())) {
String ldapId = getParameterAsString(LDAP_ID);
user = new LDAPUser(userManager, getLogger(), userId, email, ldapId, getLogger());
} else {
String password = getParameterAsString(AbstractChangePassword.NEW_PASSWORD);
user = new FileUser(userManager, getLogger(), userId, fullName, email, "");
user.setName(fullName);
user.setPassword(password);
}
ContainerUtil.enableLogging(user, getLogger());
user.setDescription(description);
user.save();
getUserManager().add(user);
setExitParameter(UserProfile.USER_ID, userId);
}