Skip to content

Commit

Permalink
Merge pull request MPOS#1753 from andymornes/next
Browse files Browse the repository at this point in the history
[FIX] Correcting user ID for new block emails
  • Loading branch information
TheSerapher committed Feb 14, 2014
2 parents 8589d84 + ac3bea9 commit bb2037d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cronjobs/findblock.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
$aAccounts = $notification->getNotificationAccountIdByType('new_block');
if (is_array($aAccounts)) {

$finder = $user->getUserName($aBlock['account_id']);
$finder = $user->getUserName($iAccountId);
foreach ($aAccounts as $aData) {
$aMailData['height'] = $aBlock['height'];
$aMailData['subject'] = 'New Block';
Expand All @@ -162,6 +162,7 @@
$aMailData['amount'] = $aBlock['amount'];
$aMailData['difficulty'] = $aBlock['difficulty'];
$aMailData['finder'] = $finder;
$aMailData['currency'] = $config['currency'];
if (!$notification->sendNotification($aData['account_id'], 'new_block', $aMailData))
$log->logError('Failed to notify user of new found block: ' . $user->getUserName($aData['account_id']));
}
Expand Down
2 changes: 1 addition & 1 deletion public/templates/mail/notifications/new_block.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<html>
<p>{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}</p>
<p>{nocache}Block Number {$DATA.height} has been discovered by {$DATA.finder} with a total value of {$DATA.amount} {$DATA.currency}! The current difficulty is {$DATA.difficulty}.{/nocache}</p>
<body>
<br/>
<br/>
Expand Down

0 comments on commit bb2037d

Please sign in to comment.