If user logged in MAgento


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. public function preDispatch()
  2. {
  3. parent::preDispatch();
  4.  
  5. if (!Mage::getSingleton('customer/session')->authenticate($this)) {
  6. $this->setFlag('', 'no-dispatch', true);
  7. if(!Mage::getSingleton('customer/session')->getBeforeUrl()) {
  8. Mage::getSingleton('customer/session')->setBeforeUrl($this->_getRefererUrl());
  9. }
  10. }
  11. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.