mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-16468 never mail deleted users; merged from MOODLE_19_STABLE
This commit is contained in:
parent
fd64f09831
commit
9c98b43986
1 changed files with 5 additions and 0 deletions
|
@ -4041,6 +4041,11 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml='', $a
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($user->deleted)) {
|
||||||
|
// do not mail delted users
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($CFG->noemailever)) {
|
if (!empty($CFG->noemailever)) {
|
||||||
// hidden setting for development sites, set in config.php if needed
|
// hidden setting for development sites, set in config.php if needed
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue