mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-48080 email: Remove some old error_log calls
This commit is contained in:
parent
981f06fad5
commit
f1c4e3d2ba
@ -5800,20 +5800,12 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml = '',
|
||||
|
||||
if (!validate_email($user->email)) {
|
||||
// We can not send emails to invalid addresses - it might create security issue or confuse the mailer.
|
||||
$invalidemail = "User $user->id (".fullname($user).") email ($user->email) is invalid! Not sending.";
|
||||
error_log($invalidemail);
|
||||
if (CLI_SCRIPT) {
|
||||
mtrace('Error: lib/moodlelib.php email_to_user(): '.$invalidemail);
|
||||
}
|
||||
debugging("email_to_user: User $user->id (".fullname($user).") email ($user->email) is invalid! Not sending.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (over_bounce_threshold($user)) {
|
||||
$bouncemsg = "User $user->id (".fullname($user).") is over bounce threshold! Not sending.";
|
||||
error_log($bouncemsg);
|
||||
if (CLI_SCRIPT) {
|
||||
mtrace('Error: lib/moodlelib.php email_to_user(): '.$bouncemsg);
|
||||
}
|
||||
debugging("email_to_user: User $user->id (".fullname($user).") is over bounce threshold! Not sending.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user