BindException bindExp) throws Exception {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Entering RegisterUserController:onsubmit()...");
}
User user = (User) command;
if (!checkPasswords(request, user)) {
return setAttributeAndShowForm(
request,
response,
bindExp,
"errors",
"Passwords, you typed are not identical.");
}
if (request.getParameter(ACTION_SUBMIT) != null) {
// TODO: need code to encrypt and decrypt password
// user.setPassword(StringUtil.encodePassword(user.getPassword(),Constants.ENCRYPTION_ALGORITHM));
StringUtil.encodePassword(user.getPassword(), Constants.ENCRYPTION_ALGORITHM);
ExecutionResult execResult = getUserService().createUser(user);
if (!execResult.isSuccessful()) {
// possible reason: e.g. the username or the email address is already taken.