diff --git a/cronjobs/findblock.php b/cronjobs/findblock.php index b7f2393a..71cca570 100755 --- a/cronjobs/findblock.php +++ b/cronjobs/findblock.php @@ -152,11 +152,16 @@ if (empty($aAllBlocks)) { // Notify users $aAccounts = $notification->getNotificationAccountIdByType('new_block'); if (is_array($aAccounts)) { + + $finder = $user->getUserName($aBlock['account_id']); foreach ($aAccounts as $aData) { $aMailData['height'] = $aBlock['height']; $aMailData['subject'] = 'New Block'; $aMailData['email'] = $user->getUserEmail($user->getUserName($aData['account_id'])); $aMailData['shares'] = $iRoundShares; + $aMailData['amount'] = $aBlock['amount']; + $aMailData['difficulty'] = $aBlock['difficulty']; + $aMailData['finder'] = $finder; if (!$notification->sendNotification($aData['account_id'], 'new_block', $aMailData)) $log->logError('Failed to notify user of new found block: ' . $user->getUserName($aData['account_id'])); } diff --git a/public/templates/mail/notifications/new_block.tpl b/public/templates/mail/notifications/new_block.tpl index 9d17d06e..46b81fbf 100644 --- a/public/templates/mail/notifications/new_block.tpl +++ b/public/templates/mail/notifications/new_block.tpl @@ -1,6 +1,6 @@ +
{nocache}Block Number {$DATA.height} has been discovered by {$DATA.finder} with a total value of {$DATA.amount}! The current difficulty is {$DATA.difficulty}.{/nocache}
-A new block has been discovered!