How to check admin is logged in or not on frontend
Hello Friends,
Here is the code to check on frontend (i.e. in any frontend file) whether the admin is logged in or not in Admin Panel.
<?php require_once('app/Mage.php'); Mage::app('default'); Mage::getSingleton('core/session', array('name' => 'adminhtml')); $session = Mage::getSingleton('admin/session'); if ( $session->isLoggedIn() ) { echo "logged in"; } else { echo "not logged in"; } ?>Thanks,
Pritesh
Pritesh Pethani