How do I know if a Magento user is an administrator?

I am using Magento 1.5 and I need to check if the user is currently a login user. I need to check this from the end of the user, because I need to make a process for members, which depends on whether they are admin users or not.

Is this possible in Magento?

+4
source share
3 answers
Mage::getSingleton('admin/session')->getUser(); 

or

 Mage::app()->getStore()->isAdmin(); 
+4
source

Try

 $admin = Mage::getModel('customer/session')->getAdmin(); if($admin->getId() != '') {//Admin is logged in} 
+1
source
 Mage::getSingleton('adminhtml/session')->getUser(); 
+1
source

All Articles