From 7bcc29c6a8f028d0a0a646ad560732c712500cf0 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Thu, 20 Jun 2013 09:18:24 +0200 Subject: [PATCH] Adding warning if user exceeds balance thresholds * Warn user if they exceeded the configured AP max thresholds for their account balance This will address #220. There does not seem a perfect solution for this but this should help. --- public/include/smarty_globals.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/include/smarty_globals.inc.php b/public/include/smarty_globals.inc.php index 923b7263..6d41bc5c 100644 --- a/public/include/smarty_globals.inc.php +++ b/public/include/smarty_globals.inc.php @@ -72,6 +72,10 @@ if (@$_SESSION['USERDATA']['id']) { $aGlobal['userdata']['est_payout'] = round($aGlobal['userdata']['est_block'] - $aGlobal['userdata']['est_donation'] - $aGlobal['userdata']['est_fee'], 3); break; } + + // Site-wide notifications, based on user events + if ($aGlobal['userdata']['balance']['confirmed'] >= $config['ap_threshold']['max']) + $_SESSION['POPUP'][] = array('CONTENT' => 'You have exceeded your accounts balance. Please transfer some ' . $config['currency'] . "!", 'TYPE' => 'errormsg'); } // Make it available in Smarty