You are here

function ip2country_rules_action_info in IP-based Determination of a Visitor's Country 7

Implements hook_rules_action_info().

File

./ip2country.rules.inc, line 73
Rules integration for the ip2country module.

Code

function ip2country_rules_action_info() {
  $actions = array();
  $actions['ip2country_set_country'] = array(
    'label' => t("Sets the user's country"),
    'group' => t('User'),
    'base' => 'ip2country_action_set_country',
    'parameter' => array(
      'user' => array(
        'type' => 'user',
        'label' => t('User'),
      ),
      'country' => array(
        'type' => 'text',
        'label' => t('Country'),
        'options list' => 'country_get_list',
        'restriction' => 'input',
      ),
    ),
  );
  return $actions;
}