cancel
Showing results for 
Search instead for 
Did you mean: 

How update current user - email , first name, last name, and to Subscribed

How update current user - email , first name, last name, and to Subscribed

How Update current user -  email , first name, last name, and to Subscribed ?

1 REPLY 1

Re: How update current user - email , first name, last name, and to Subscribed

 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();