forked from kevinowino869/mitrobill
run_hook on cron forgot to uncomment
This commit is contained in:
@ -21,7 +21,7 @@ $textExpired = Lang::getNotifText('expired');
|
||||
|
||||
$d = ORM::for_table('tbl_user_recharges')->where('status', 'on')->where_lte('expiration', date("Y-m-d"))->find_many();
|
||||
echo "Found " . count($d) . " user(s)\n";
|
||||
//run_hook('cronjob'); #HOOK
|
||||
run_hook('cronjob'); #HOOK
|
||||
|
||||
foreach ($d as $ds) {
|
||||
$date_now = strtotime(date("Y-m-d H:i:s"));
|
||||
@ -55,7 +55,7 @@ foreach ($d as $ds) {
|
||||
$p['price'] += $add_cost;
|
||||
}
|
||||
}
|
||||
if ($p && $p['enabled'] && $c['balance'] >= $p['price']) {
|
||||
if ($p && $c['balance'] >= $p['price']) {
|
||||
if (Package::rechargeUser($ds['customer_id'], $ds['routers'], $p['id'], 'Customer', 'Balance')) {
|
||||
// if success, then get the balance
|
||||
Balance::min($ds['customer_id'], $p['price']);
|
||||
|
Reference in New Issue
Block a user