*/ class Mage_Customer_Block_Account_Dashboard_Info extends Mage_Core_Block_Template { public function getCustomer() { return Mage::getSingleton('customer/session')->getCustomer(); } public function getChangePasswordUrl() { return Mage::getUrl('*/account/edit/changepass/1'); } /** * Get Customer Subscription Object Information * * @return Mage_Newsletter_Model_Subscriber */ public function getSubscriptionObject() { if(is_null($this->_subscription)) { $this->_subscription = Mage::getModel('newsletter/subscriber')->loadByCustomer(Mage::getSingleton('customer/session')->getCustomer()); } return $this->_subscription; } /** * Gets Customer subscription status * * @return bool */ public function getIsSubscribed() { return $this->getSubscriptionObject()->isSubscribed(); } /** * Newsletter module availability * * @return boolean */ public function isNewsletterEnabled() { return $this->getLayout()->getBlockSingleton('customer/form_register')->isNewsletterEnabled(); } }