]> git.mjollnir.org Git - moodle.git/commitdiff
Better error messages for restricted users
authormoodler <moodler>
Wed, 4 Feb 2004 12:59:05 +0000 (12:59 +0000)
committermoodler <moodler>
Wed, 4 Feb 2004 12:59:05 +0000 (12:59 +0000)
lang/en/error.php
lib/moodlelib.php

index 6ccea96fbe3ebfc0760a880e5fee8f7562e5821b..db1af6b50a8d7fcac7bf09988f53c77308b00c66 100755 (executable)
@@ -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';
index 2a2bb4fe2a8a9d218c7390bdc162133ab7b9863f..93695947a7788651f7b1826a7980016157fcdd83 100644 (file)
@@ -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);
         }
     }
 }