UserForm user = (UserForm) form;
super.validateClientId(request, user);
ActionMessages msgs = new ActionMessages();
while (msgs.isEmpty()) {
UserBean loginUser = super.getLoginUser(request, response);
if(loginUser == null) {
msgs.add("user", new ActionMessage("error.user_not_login"));
break;
}
if(loginUser.getId() != user.getId()){
msgs.add("user", new ActionMessage("error.access_deny"));
break;
}
UserBean ubean = UserDAO.getUserByID(user.getId());
if (ubean == null || ubean.getStatus()!=UserBean.STATUS_NORMAL) {
msgs.add("id", new ActionMessage("error.user_not_available",
new Integer(user.getId())));
break;
}
if (!StringUtils.equals(ubean.getPassword(), user
.getPassword())){
msgs.add("password",
new ActionMessage("error.user_auth_failed"));
break;
}
boolean update = false;
if(StringUtils.isNotEmpty(user.getSbirth())){
try{
int birth = Integer.parseInt(user.getSbirth());
int year = birth / 10000;
int month = (birth % 10000) / 100;
int date = birth % 100;
long lbirth = DateUtils.getDateBegin(year,month,date).getTime().getTime();
ubean.setBirth(new java.sql.Date(lbirth));
System.out.println("================= new birth is " + ubean.getBirth());
update = true;
}catch(Exception e){}
}
if(update){
try {