Skip to main content
page last edited on 22 November 2018

Checking if you are in admin or customer area

Version: 5.4 and early

If you need to check whether you are in admin area or in customer one, use the following method:

\XLite::isAdminZone();

It is particularly useful, if you need to perform this check in a model class or any other zone-independent one. The method is defined in \XLite class and it will return true if admin.php script was called, or false is cart.php one was.