Merge branch 'MDL-64385-master' of git://github.com/aanabit/moodle

This commit is contained in:
Eloy Lafuente (stronk7)
2019-02-11 12:35:26 +01:00
2 changed files with 161 additions and 2 deletions
+4 -2
View File
@@ -6436,8 +6436,10 @@ function send_password_change_info($user) {
function email_is_not_allowed($email) {
global $CFG;
// Comparing lowercase domains.
$email = strtolower($email);
if (!empty($CFG->allowemailaddresses)) {
$allowed = explode(' ', $CFG->allowemailaddresses);
$allowed = explode(' ', strtolower($CFG->allowemailaddresses));
foreach ($allowed as $allowedpattern) {
$allowedpattern = trim($allowedpattern);
if (!$allowedpattern) {
@@ -6456,7 +6458,7 @@ function email_is_not_allowed($email) {
return get_string('emailonlyallowed', '', $CFG->allowemailaddresses);
} else if (!empty($CFG->denyemailaddresses)) {
$denied = explode(' ', $CFG->denyemailaddresses);
$denied = explode(' ', strtolower($CFG->denyemailaddresses));
foreach ($denied as $deniedpattern) {
$deniedpattern = trim($deniedpattern);
if (!$deniedpattern) {