Error message for restricted users
This commit is contained in:
@@ -6,6 +6,7 @@ $string['erroronline'] = 'Error on line $a';
|
||||
$string['fieldrequired'] = '\"$a\" is a required field';
|
||||
$string['invalidfieldname'] = '\"$a\" is not a valid field name';
|
||||
$string['missingfield'] = 'Field \"$a\" is missing';
|
||||
$string['restricteduser'] = 'Sorry, but you are currently 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';
|
||||
|
||||
+1
-1
@@ -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"), $redirect);
|
||||
error(get_string("restricteduser", "error"), $redirect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user