From 13a794757e0824acafd0f686efbd268c61b2a5ce Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Wed, 19 Sep 2007 07:03:34 +0000 Subject: [PATCH] accesslib: has_capability() - useful debugging bit... --- lib/accesslib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/accesslib.php b/lib/accesslib.php index ee029b5be0..a2fc5e4955 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -399,6 +399,10 @@ function has_capability($capability, $context=NULL, $userid=NULL, $doanything=tr load_all_capabilities(); } + + // divulge how many times we are called + //// error_log("has_capability: id:{$context->id} path:{$context->path} userid:$userid cap:$capability"); + if ($USER->id === $userid) { // // For the logged in user, we have $USER->access -- 2.39.5