XF 2.0 enable debug mode for super admin

You can do it per user group as that is not fetched in the config file.

So you need to do this based in IP's. Add the following to your src/config.php

Code:
// Add your IP here
$debug_ips = array('xxx.xx.x.xxx');

//For multiple IPs use this format above
//$debug_ips = array('xxx.xx.x.xxx','yyy.yy.y.yyy');

// Fetching IP's
if(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    $ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
    $ip_address = $_SERVER['REMOTE_ADDR'];
}

// Enable debug if IP matches
if(in_array($ip_address, $debug_ips))
    $config['debug'] = true;
 
Top Bottom