Check request from frontend or backend

Tweet, share & co

tweet fb share g+ share

Tags


Description

Check whether request is coming from frontend or backend.

Code

if(Mage::app()->getStore()->isAdmin() && Mage::getDesign()->getArea() == 'adminhtml'){
        //request is from backend/admin
} else {
        //request is NOT from backend/admin
}