I used the following hack to display the complete information on the user currently logged in. This will be displayed instead of the 'Logged in as:' field at the bottom-left of the page.
This proved very useful to me for debugging LDAP/AD group membership problems.
I modified the function tlp_userinfo() in inc/template.php.
Original:
function tpl_userinfo(){ global $lang; global $INFO; if($_SERVER['REMOTE_USER']){ print $lang['loggedinas'].': '.$INFO['userinfo']['name']; return true; } return false; }
With extra debugging information:
function tpl_userinfo(){ global $lang; global $INFO; if($_SERVER['REMOTE_USER']){ print 'Debug:<br><font size=2><pre>'.print_r($INFO['userinfo'],true).'</pre></font>'; return true; } return false; }
A nicer way of doing this is checking for a custom option userinfo_debug, which can now be set in conf/local.php:
function tpl_userinfo(){ global $lang; global $INFO; global $conf; if($_SERVER['REMOTE_USER']){ if($conf['userinfo_debug'] == 'true') { print 'Debug:<br><font size=2><pre>'.print_r($INFO['userinfo'],true).'</pre></font>'; } else { print $lang['loggedinas'].': '.$INFO['userinfo']['name']; } return true; } return false; }
Now to turn on debugging, set the following in conf/local.php:
$conf['userinfo_debug'] = 'true';
To switch off debugging, set the following in conf/local.php:
$conf['userinfo_debug'] = 'false';