Permalink
Browse files

Merge branch 'MDL-26185_m20' of git://github.com/rwijaya/moodle into …

…MOODLE_20_STABLE
  • Loading branch information...
2 parents d7dd177 + 507de74 commit 728f3c9d0843e2f2969380ba82eae158d56ec412 Sam Hemelryk committed Apr 4, 2011
Showing with 1 addition and 11 deletions.
  1. +1 −11 message/output/email/message_output_email.php
@@ -46,18 +46,8 @@ function send_message($eventdata) {
return true;
}
- //hold onto email preference because /admin/cron.php sends a lot of messages at once
- static $useremailaddresses = array();
-
//check user preference for where user wants email sent
- if (!array_key_exists($eventdata->userto->id, $useremailaddresses)) {
- $useremailaddresses[$eventdata->userto->id] = get_user_preferences('message_processor_email_email', $eventdata->userto->email, $eventdata->userto->id);
- }
- $usertoemailaddress = $useremailaddresses[$eventdata->userto->id];
-
- if ( !empty($usertoemailaddress)) {
- $userto->email = $usertoemailaddress;
- }
+ $eventdata->userto->email = get_user_preferences('message_processor_email_email', $eventdata->userto->email, $eventdata->userto->id);
$result = email_to_user($eventdata->userto, $eventdata->userfrom,
$eventdata->subject, $eventdata->fullmessage, $eventdata->fullmessagehtml);

0 comments on commit 728f3c9

Please sign in to comment.