From 3d3c095d598070a3ccf1399c4c460bb1243e68dd Mon Sep 17 00:00:00 2001 From: Mike Frysinger <vapier@gentoo.org> Date: Tue, 5 Dec 2006 21:17:53 +0100 Subject: [PATCH] add some helpful user/group information to ?do this simple patch adds user/group output when viewing a page with ?do darcs-hash:20061205201753-5224c-600980b0649b4cc927be5f46516f73aff3a6e7ed.gz --- inc/infoutils.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/inc/infoutils.php b/inc/infoutils.php index a6d0c269e..ab6e3fdc3 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -164,6 +164,16 @@ function check(){ msg('Debugging support is disabled',1); } + if($INFO['userinfo']['name']){ + global $auth; + msg('You are currently logged in as '.$_SESSION[DOKU_COOKIE]['auth']['user'].' ('.$INFO['userinfo']['name'].')',0); + + $info = $auth->getUserData($_SESSION[DOKU_COOKIE]['auth']['user']); + msg('You are part of the groups '.implode($info['grps'],', '),0); + }else{ + msg('You are currently not logged in',0); + } + msg('Your current permission for this page is '.$INFO['perm'],0); if(is_writable($INFO['filepath'])){ -- GitLab