mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
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:
parent
1d693c8fd0
commit
2029fcf47f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user