function ip2country_action_set_country in IP-based Determination of a Visitor's Country 7
Sets the country_iso_code_2 property of the global $user object.
1 string reference to 'ip2country_action_set_country'
- ip2country_rules_action_info in ./
ip2country.rules.inc - Implements hook_rules_action_info().
File
- ./
ip2country.rules.inc, line 100 - Rules integration for the ip2country module.
Code
function ip2country_action_set_country($account, $country_code) {
// Store the ISO country code in the $user object.
user_save($account, array(
'country_iso_code_2' => $country_code,
));
}