From 82396e5b1f485a7f8e7355cd344bd11dac887511 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 22 Sep 2006 05:23:59 +0000 Subject: [PATCH] Improved error messages for role_assign to be more helpful --- lib/accesslib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/accesslib.php b/lib/accesslib.php index 317b95ae62..a06a723756 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -1363,17 +1363,17 @@ function role_assign($roleid, $userid, $groupid, $contextid, $timestart=0, $time } if ($userid && !record_exists('user', 'id', $userid)) { - debugging('User does not exist!'); + debugging('User ID '.intval($userid).' does not exist!'); return false; } if ($groupid && !record_exists('groups', 'id', $groupid)) { - debugging('Group does not exist!'); + debugging('Group ID '.intval($groupid).' does not exist!'); return false; } if (!$context = get_context_instance_by_id($contextid)) { - debugging('A valid context must be provided'); + debugging('Context ID '.intval($contextid).' does not exist!'); return false; } -- 2.39.5