From e2b84345eaf000186c5bd45c24ed8e6910db0216 Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 14 Feb 2007 22:53:17 +0000 Subject: [PATCH] MDL-8268 cleanup in get_user_capability_course() --- lib/accesslib.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/accesslib.php b/lib/accesslib.php index 9ffe9c2c235..77caf567084 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -3550,12 +3550,7 @@ function count_role_users($roleid, $context, $parent=false) { * @param int $userid * @return array */ -function get_user_capability_course($capability, $userid='') { - - global $USER; - if (!$userid) { - $userid = $USER->id; - } +function get_user_capability_course($capability, $userid=NULL) { $usercourses = array(); $courses = get_records_select('course', '', '', 'id, id');