function commerce_file_license_rules_condition_address_exists in Commerce File 7
Rules condition: user's IP address exists already in the access logs
1 string reference to 'commerce_file_license_rules_condition_address_exists'
- commerce_file_rules_condition_info in ./
commerce_file.rules.inc - Implements hook_rules_condition_info().
File
- ./
commerce_file.rules.inc, line 288 - Provides Rules integration for entities provided via the CRUD API.
Code
function commerce_file_license_rules_condition_address_exists($license) {
$addresses = $license->addresses;
$current_address = ip_address();
return isset($addresses) && isset($addresses[$current_address]);
}