<?php
/**
 * [BEGIN_COT_EXT]
 * Hooks=users.auth.check.done
 * [END_COT_EXT]
 */

defined('COT_CODE') or die('Wrong URL.');

if((float)$cfg['payments']['regpaysumm'] > 0)
{
	$urr = $db->query("SELECT * FROM $db_users WHERE user_id=".$ruserid)->fetch();

	if($urr['user_logcount'] == 1)
	{
    require_once cot_incfile('payments', 'module');

    cot_payments_updateuserbalance_hand($ruserid, (float)$cfg['payments']['regpaysumm'], $L['payments_regpaysumm_pay_desc'], true);

		/* === Hook === */
	  foreach (cot_getextplugins('payments.regpay.done') as $pl)
	  {
		  include $pl;
	  }
	  /* ===== */
	}
}