getCustomer(); if ($customer && $customer->getId()) { $validationResult = $customer->validate(); if ((true !== $validationResult) && is_array($validationResult)) { if ($addErrors) { foreach ($validationResult as $error) { Mage::getSingleton('customer/session')->addError($error); } } if ($redirect) { $this->_redirect('customer/account/edit'); $this->setFlag('', self::FLAG_NO_DISPATCH, true); } return false; } } return true; } }