MDL-69600 core: Expose divertallemails config in UI

This commit is contained in:
Brendan Heywood
2020-09-29 20:29:32 +10:00
parent 5486b031ee
commit 0983a1c3d1
4 changed files with 41 additions and 1 deletions
+1 -1
View File
@@ -5984,7 +5984,7 @@ function email_should_be_diverted($email) {
return true;
}
$patterns = array_map('trim', explode(',', $CFG->divertallemailsexcept));
$patterns = array_map('trim', preg_split("/[\s,]+/", $CFG->divertallemailsexcept));
foreach ($patterns as $pattern) {
if (preg_match("/$pattern/", $email)) {
return false;