auth:userinfo_debugging
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
auth:userinfo_debugging [2018-07-25 23:13] – Update to conform with code base 2018-07-25 Aaron Smith | 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; | ||
- | /** @var Input $INPUT */ | ||
- | global $INPUT; | ||
- | |||
- | if($INPUT-> | ||
- | print $lang[' | ||
- | return true; | ||
- | } | ||
- | return false; | ||
- | } | ||
- | |||
- | </ | ||
- | |||
- | With extra debugging information: | ||
- | <code php> | ||
- | function tpl_userinfo() { | ||
- | global $lang; | ||
- | /** @var Input $INPUT */ | ||
- | global $INPUT; | ||
- | |||
- | if($INPUT-> | ||
- | print $lang[' | ||
- | msg(' | ||
- | 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 $conf; | ||
- | global $lang; | ||
- | global $USERINFO; | ||
- | /** @var Input $INPUT */ | ||
- | global $INPUT; | ||
- | |||
- | if($INPUT-> | ||
- | print $lang[' | ||
- | if($conf[' | ||
- | 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.1532553190.txt.gz · Last modified: 2018-07-25 23:13 by Aaron Smith