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(configDir, userId, email, ldapId, getLogger());
} else {
String password = getParameterAsString(UserPassword.NEW_PASSWORD);
user = new FileUser(configDir, 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);
}