auth:userinfo_debugging
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
auth:userinfo_debugging [2015-01-03 18:43] – 37.200.79.27 | auth:userinfo_debugging [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | I used the following hack to display the complete information on the user currently logged in. This will be displayed instead of the ' | ||
- | |||
- | This proved very useful to me for debugging LDAP/AD group membership problems. | ||
- | |||
- | I modified the function tpl_userinfo() in '' | ||
- | |||
- | ===== The hack ===== | ||
- | |||
- | Original: | ||
- | <code php> | ||
- | function tpl_userinfo(){ | ||
- | global $lang; | ||
- | global $INFO; | ||
- | if($_SERVER[' | ||
- | print $lang[' | ||
- | return true; | ||
- | } | ||
- | return false; | ||
- | } | ||
- | </ | ||
- | |||
- | With extra debugging information: | ||
- | <code php> | ||
- | function tpl_userinfo(){ | ||
- | global $lang; | ||
- | global $INFO; | ||
- | if($_SERVER[' | ||
- | print ' | ||
- | return true; | ||
- | } | ||
- | return false; | ||
- | } | ||
- | </ | ||
- | |||
- | ===== The nicer way ===== | ||
- | |||
- | A nicer way of doing this is checking for a custom option '' | ||
- | |||
- | <code php> | ||
- | function tpl_userinfo(){ | ||
- | global $lang; | ||
- | global $INFO; | ||
- | global $conf; | ||
- | if($_SERVER[' | ||
- | if($conf[' | ||
- | print ' | ||
- | } else { | ||
- | print $lang[' | ||
- | } | ||
- | return true; | ||
- | } | ||
- | return false; | ||
- | } | ||
- | </ | ||
- | Now to turn on debugging, set the following in '' | ||
- | <code php> | ||
- | $conf[' | ||
- | </ | ||
- | To switch off debugging, set the following in '' | ||
- | <code php> | ||
- | $conf[' | ||
- | </ | ||
auth/userinfo_debugging.1420307008.txt.gz · Last modified: 2015-01-03 18:43 by 37.200.79.27