/** * Fetch an update with profile */ public function updateProfileAction() { $profile = null; try { $profile = $this->_initProfile(); $profile->fetchUpdate(); if ($profile->hasDataChanges()) { $profile->save(); $this->_session->addSuccess($this->__('The profile has been updated.')); } else { $this->_session->addNotice($this->__('The profile has no changes.')); } } catch (Mage_Core_Exception $e) { $this->_session->addError($e->getMessage()); } catch (Exception $e) { $this->_session->addError($this->__('Failed to update the profile.')); Mage::logException($e); } if ($profile) { $this->_redirect('*/*/view', array('profile' => $profile->getId())); } else { $this->_redirect('*/*/'); } }