Merge pull request #1753 from andymornes/next
[FIX] Correcting user ID for new block emails
This commit is contained in:
commit
bb2037d813
@ -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']));
|
||||
}
|
||||
|
||||
@ -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/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user