User user = SystemVariableUtils.getSessionVariable().getUser();
oldPassword = new SimpleHash("MD5", oldPassword.toCharArray()).toString();
if (!user.getPassword().equals(oldPassword)) {
throw new ServiceException("旧密码不正确.");
}
accountManager.updateUserPassword(user,newPassword);
return "redirect:/logout";