From: moodler Date: Fri, 22 Sep 2006 05:23:59 +0000 (+0000) Subject: Improved error messages for role_assign to be more helpful X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=82396e5b1f485a7f8e7355cd344bd11dac887511;p=moodle.git Improved error messages for role_assign to be more helpful --- 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; }