private void changePassword(User user, String currentPassword, String newPassword1, String newPassword2) throws Exception
{
String cryptCurPassword = DigestUtils.sha256Hex(currentPassword +passwordHashPadding);
if(!user.getPassword().equals(cryptCurPassword))
throw new ChangePasswordException();
if(!newPassword1.equals(newPassword2))
throw new ChangePasswordException();
if(newPassword1.length()<6)
throw new ChangePasswordException();
String cryptNewPassword = DigestUtils.sha256Hex(newPassword1 +passwordHashPadding);
user.setPassword(cryptNewPassword);
userDAO.updateUser(user);
}