email_to_user: MDL-16328 - prevent empty receeipent address

Be a bit defensive as it seems to be possible for this to happen
with LDAP auth
This commit is contained in:
poltawski 2009-03-19 10:35:08 +00:00
parent 1d693c8fd0
commit 2029fcf47f

View File

@ -4075,7 +4075,7 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml='', $a
global $CFG, $FULLME, $MNETIDPJUMPURL;
static $mnetjumps = array();
if (empty($user)) {
if (empty($user) || empty($user->email)) {
return false;
}