Details
Description
Moodle will attempt to send email to a user even if their email address is null. This violates RFC821 and can generate a lot of error messages for administrators.
It seems a straightforward fix would be to change the first conditional in email_to_user() in lib/moodlelib.php from:
if (empty($user)) {
return false;
}
to:
if (empty($user) || empty($user->email)) { return false; } }
Hi Jason, i'm interested how empty email addresses got into users profiles since I don't think any of forms allow this?