Permalink
Browse files

fix(core): _elgg_send_email_notification respects other email handlers

If some other email handler already successfully sent the email don't
try to sent it again.

fixes: #8300
  • Loading branch information...
jeabakker committed Oct 12, 2016
1 parent ae25da4 commit 80bd413d3dea1d30b1257d30fe877e6c2c1fa7b4
Showing with 6 additions and 0 deletions.
  1. +6 −0 engine/lib/notification.php
@@ -195,6 +195,12 @@ function _elgg_notifications_cron() {
* @access private
*/
function _elgg_send_email_notification($hook, $type, $result, $params) {
if ($result === true) {
// assume someone else already sent the message
return;
}
/* @var \Elgg\Notifications\Notification $message */
$message = $params['notification'];

0 comments on commit 80bd413

Please sign in to comment.