for(int i = 0; i < cookies.length; i++) {
if(cookies[i].getName().equals("user"))
user = cookies[i].getValue();
}
AccountObject lao = d.getAccountObject(user);
if (lao !=null) {
//Check if any of them are null,
//if so, set to whatever they had last time.
if(!notifyConfig.isEmpty()){
//Error Checking
long ncfg = Long.parseLong(notifyConfig);
lao.setNotifyConfig(ncfg);
}
if(!phoneNumber.isEmpty())
lao.setPhoneNumber(phoneNumber);
if(!carrier.isEmpty())
lao.setCarrier(carrier);
d.updateAccountObject(lao);
resp.sendRedirect("/debug.jsp?msg=preference_update_success");
}
else
resp.sendRedirect("/debug.jsp?msg=preference_update_failed");