<?php

class ControllerExtensionModuleAccountCombineEvent extends Controller {

	public function eventCustomerAddAffiliateBefore(&$route, &$args) {
		if(is_array($args) && isset($args[0])) {
			$customer_id = $args[0];
			if($customer_id && $this->config->get('module_account_combine_customer_group_id')) $this->db->query("UPDATE " . DB_PREFIX . "customer SET customer_group_id = '" . (int)$this->config->get('module_account_combine_customer_group_id') . "' WHERE customer_id = '" . (int)$customer_id . "'");
		}
	}



}