<?php

/**
 * [BEGIN_COT_EXT]
 * Hooks=users.profile.update.first
 * [END_COT_EXT]
 */

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

if ($action == 'main' && function_exists('cot_import_location_user'))
{
	$location = cot_import_location_user('P');
	$ruser['user_country'] = $location['country'];
	$ruser['user_region'] = $location['region'];
	$ruser['user_city'] = $location['city'];
	$_POST['rcountry'] = $ruser['user_country'];
	$_POST['rusercountry'] = $ruser['user_country'];
}
