Log in

View Full Version : GLOBAL var for admincp?


Antivirus
10-15-2008, 10:16 PM
Is there some sort of global variable which defines whether or not you are in the AdminCP?

What I am trying to do is following condition within hook: fetch_userinfo

if (!$within_admincp)
{
// do code here...
}

calorie
10-16-2008, 12:47 AM
Perhaps try one of the constants that is defined at the start of the admincp global.php file:

// identify where we are
define('VB_AREA', 'AdminCP');
define('IN_CONTROL_PANEL', true);

Antivirus
10-16-2008, 04:24 PM
works - thanks Calorie