MDL-48080 email: Remove some old error_log calls

This commit is contained in:
pau.ferrer-ocana 2014-12-16 10:04:34 +01:00 committed by crazyserver
parent 981f06fad5
commit f1c4e3d2ba

View File

@ -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;
}