From: moodler Date: Wed, 4 Feb 2004 12:59:05 +0000 (+0000) Subject: Better error messages for restricted users X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9b591be622f8378933c08aa3c2f4f15343f3905f;p=moodle.git Better error messages for restricted users --- diff --git a/lang/en/error.php b/lang/en/error.php index 6ccea96fbe..db1af6b50a 100755 --- a/lang/en/error.php +++ b/lang/en/error.php @@ -7,7 +7,7 @@ $string['fieldrequired'] = '\"$a\" is a required field'; $string['invalidfieldname'] = '\"$a\" is not a valid field name'; $string['missingfield'] = 'Field \"$a\" is missing'; $string['modulerequirementsnotmet'] = 'Module \"$a->modulename\" ($a->moduleversion) could not be installed. It requires a newer version of Moodle (currently you are using $a->currentmoodle, you need $a->requiremoodle).'; -$string['restricteduser'] = 'Sorry, but you are currently restricted from doing that.'; +$string['restricteduser'] = 'Sorry, but your current account \"$a\" is restricted from doing that.'; $string['unknowncourse'] = 'Unknown course named \"$a\"'; $string['usernotaddederror'] = 'User \"$a\" not added - unknown error'; $string['usernotaddedregistered'] = 'User \"$a\" not added - already registered'; diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 2a2bb4fe2a..93695947a7 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -478,7 +478,7 @@ function check_for_restricted_user($username=NULL, $redirect="") { if (!empty($CFG->restrictusers)) { $names = explode(',', $CFG->restrictusers); if (in_array($username, $names)) { - error(get_string("restricteduser", "error"), $redirect); + error(get_string("restricteduser", "error", fullname($USER)), $redirect); } } }