WebErrors errors = validatePasswordSubmit(user.getId(), origPwd,
newPwd, email, realname, request);
if (errors.hasErrors()) {
return errors.showErrorPage(model);
}
CmsUserExt ext = user.getUserExt();
if (ext == null) {
ext = new CmsUserExt();
}
ext.setRealname(realname);
cmsUserExtMng.update(ext, user);
cmsUserMng.updatePwdEmail(user.getId(), newPwd, email);
model.addAttribute("message", "global.success");
return profileEdit(request, model);
}