Merge pull request #1753 from andymornes/next

[FIX] Correcting user ID for new block emails
This commit is contained in:
Sebastian Grewe 2014-02-14 06:34:51 +01:00
commit bb2037d813
2 changed files with 3 additions and 2 deletions

View File

@ -153,7 +153,7 @@ if (empty($aAllBlocks)) {
$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';
@ -162,6 +162,7 @@ if (empty($aAllBlocks)) {
$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']));
}

View File

@ -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/>