Magento 1.5.1.0 - How to check in the frontend if admin is logged in

In Magento 1.5.1.0, I've tried different approaches just to check in the frontend if the admin is logged in. There are lots of codes I found in the net but they didn't work.

Well, the easiest approach is just this :
Mage::getModel('admin/session')->isLoggedIn()

I used that in the custom router I created.

Now buy me some beer!

Comments

Popular posts from this blog

How to fix Cignal Top Box error - Please perform a smart card reset by removing your smart card for 15 seconds then reinsert the card. (1/2)

Magento: can't login to admin panel, can't add product to cart

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Catalog\Model\ProductRepository::getProductFromLocalCache() must be of the type string, null given, called in /vendor/magento/module-catalog/Model/ProductRepository.php on line 270 and defined in vendor/magento/module-catalog/Model/ProductRepository.php:751