try {
Mage::getSingleton('customer/session')->getCustomer()
->setFirstname($this->getRequest()->getParam('firstname', false))
->setLastname($this->getRequest()->getParam('lastname', false))
->setEmail(strtolower($this->getRequest()->getParam('email', false)))
->setIsSubscribed((boolean)$this->getRequest()->getParam('is_subscribed', false))
->save();
Mage::getSingleton('customer/session')->addSuccess($this->__('The account information has been saved.'));
}
catch (Exception $e) {
Mage::getSingleton('customer/session')->addError($this->__('An error occurred while saving your details.'));
header( 'Location: ' . Mage::getUrl('oneallpage', array('_secure' => true)) ) ;
die();
}
header( 'Location: ' . Mage::getUrl('customer/account', array('_secure' => true)) ) ;
die();